Author Topic: Window Repair 1.9.2  (Read 52811 times)

0 Members and 1 Guest are viewing this topic.

Offline Shane

  • Top Geek, err uh Dog.
  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9280
  • Location: USA
  • Karma: 138
  • "Knowledge should be shared not hidden."
    • View Profile
    • Tweaking.com
Re: Window Repair 1.9.2
« Reply #75 on: March 05, 2013, 01:07:20 PM »
Got it :-)

Shane
PLEASE EDIT YOUR TOPIC AND PUT (SOLVED) IF YOU ARE ALL FIXED.

(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline Willy2

  • Hero Member
  • *****
  • Join Date: Oct 2011
  • Posts: 1116
  • Karma: 18
    • View Profile
Re: Window Repair 1.9.2
« Reply #76 on: March 06, 2013, 05:24:18 AM »
At the start of "Repair WMI" and "Repair Firewall" some services are stopped. But there're some other Services that are dependent on these Services and then these are stopped as well. But they're not started again (net start .... ???).

The dependent Services that are stopped as well, on my HP laptop (Win 7) are:

Under Repair WMI:  (as a result of stopping "Winmgmt")
- Security Center (wscsvc)
- IP Helper (iphlpsvc)
- HP Wireless Assistent Service (a Service installed by HP)

Under Repair Firewall: (as a result of stopping "BFE")
- IPsec Policy Agent ("Policy Agent")
- IKE and AuthIP IPsec Keying Modules ("IKEEXT")

Are these Services important ? Must a "net start ...... " command for these services, be included in the appropriate batch files as well ? (No need to issue a new version now, though.)
« Last Edit: March 06, 2013, 08:47:57 AM by Willy2 »

Offline Shane

  • Top Geek, err uh Dog.
  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9280
  • Location: USA
  • Karma: 138
  • "Knowledge should be shared not hidden."
    • View Profile
    • Tweaking.com
Re: Window Repair 1.9.2
« Reply #77 on: March 06, 2013, 11:04:27 AM »
Some services stop when the service they need stops.

This isnt a big deal as you need to reboot after the repairs anyways and the services will be started back up :-)

Shane
PLEASE EDIT YOUR TOPIC AND PUT (SOLVED) IF YOU ARE ALL FIXED.

(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline Willy2

  • Hero Member
  • *****
  • Join Date: Oct 2011
  • Posts: 1116
  • Karma: 18
    • View Profile
Re: Window Repair 1.9.2
« Reply #78 on: March 09, 2013, 05:53:15 PM »
WR v1.9.12 can be improved. I know WR (re-)registers a number of files to make things work (again). But WR does not always target the proper (sub-)folder. E.g., some files are not located in "c:\windows\system32" and then those files won't get (re-)registered.

Watch your email. To be continued.

Offline Shane

  • Top Geek, err uh Dog.
  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9280
  • Location: USA
  • Karma: 138
  • "Knowledge should be shared not hidden."
    • View Profile
    • Tweaking.com
Re: Window Repair 1.9.2
« Reply #79 on: March 10, 2013, 01:09:32 PM »
I have it purposely doing system32 and syswow64 folders, this is to handle both 32 bit and 64 bit and all OS's. So some dlls may not be on the version of Windows, but the nice thing about the register system files is if the file isnt there it is simply gives an error that the file isnt there and moves on :-)

Really was just a simpler way to make the repair instead of making that repair 4 times bigger and harder by putting in so many checks for each version of Windows.

I got your mail and will be looking over it soon :-)

Shane
PLEASE EDIT YOUR TOPIC AND PUT (SOLVED) IF YOU ARE ALL FIXED.

(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline Willy2

  • Hero Member
  • *****
  • Join Date: Oct 2011
  • Posts: 1116
  • Karma: 18
    • View Profile
Re: Window Repair 1.9.2
« Reply #80 on: March 10, 2013, 04:26:31 PM »
I wasn't clear enough. I need to rewrite my previous post. WR assumes one file is located in the "syswow64" and/or "system32" subfolder. But that particular file is actually located in a "%commonprogramfiles%" subfolder only.

Again, watch your email box in the coming days/week, for more details. I'll need to put "Dependency Walker" to work.
« Last Edit: March 13, 2013, 05:57:24 AM by Willy2 »

Offline Shane

  • Top Geek, err uh Dog.
  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9280
  • Location: USA
  • Karma: 138
  • "Knowledge should be shared not hidden."
    • View Profile
    • Tweaking.com
Re: Window Repair 1.9.2
« Reply #81 on: March 11, 2013, 11:40:41 AM »
Ah! Gottcha :-)

By the way I am making a word game that will be part of tweaking.com

Off the norm I know, but I always wanted to make a game and in 1 short week it is already playable lol. If your up to it you are welcome to test it when it is ready :-)

Shane
PLEASE EDIT YOUR TOPIC AND PUT (SOLVED) IF YOU ARE ALL FIXED.

(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline Willy2

  • Hero Member
  • *****
  • Join Date: Oct 2011
  • Posts: 1116
  • Karma: 18
    • View Profile
Re: Window Repair 1.9.2
« Reply #82 on: March 12, 2013, 02:02:19 AM »
In response to another thread on this forum where someone had trouble with one Service (file) (http://www.tweaking.com/forums/index.php/topic,934.0.html), another thought/suggestion surfaced.

I came across this piece of programcode in one of the WR repairs:

"MSIExec /unregister"
"MSIExec /regserver"
"regsvr32.exe /s %windir%\system32\msi.dll"



This has led me to the following suggestion: Perhaps you can add to WR, program code that (re-)registers ALL MS/Default system files, that execute/control the default (system) Services.
E.g., in the "Set Services to Default" repair job ? Or at any other ((more) appropriate) spot in WR ?
E.g., at the beginning of WR ? In either a separate (clickable/tickable) repair job or a repair job that's simply always executed/always runs, no matter what the user chooses ??

It could solve A LOT OF problems !!!!
« Last Edit: March 12, 2013, 02:15:10 AM by Willy2 »

Offline Shane

  • Top Geek, err uh Dog.
  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9280
  • Location: USA
  • Karma: 138
  • "Knowledge should be shared not hidden."
    • View Profile
    • Tweaking.com
Re: Window Repair 1.9.2
« Reply #83 on: March 12, 2013, 11:19:07 AM »
When I made the very first version of the Windows repair I had the register system files do every dll and ocx file in the system 32 dir.

And the oddest thing would happen. It broke things!!! I was shocked.

For my system and a couple of others one of the dll files when simply registering it would cause the language file to show up on the task bar in Windows. Another one caused the components manger not to work. And there was some other very odd things that happened.

So I changed the repair, this time I decided instead of doing all the files in the system32 folder I will make a list of safe files to register. I thought about having it do allt he files and making a dont register list but decided it was not a good idea as you never know what would be on a users system.

So to make the list of safe files to register I searched on Microsoft website for any help articles that had the register command in them and grabbed every file that was in them. And thats how I got the list.

Shane
PLEASE EDIT YOUR TOPIC AND PUT (SOLVED) IF YOU ARE ALL FIXED.

(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline Willy2

  • Hero Member
  • *****
  • Join Date: Oct 2011
  • Posts: 1116
  • Karma: 18
    • View Profile
Re: Window Repair 1.9.2
« Reply #84 on: March 14, 2013, 05:23:03 AM »
A number of things popped up when I went through all the WR batch files. A number of issues surfaced.

1. One complete repair ("Register system files") and some commands in other repairs will always fail when the Windows OS wasn't installed on the logical C: drive but instead on e.g. the D: or E: drive. And then it doesn't matter whether or not this batch file and these commands are executed under the System account or a User account.

2. Another complete repair ("Repair Internet Explorer") MUST be run under an account with Administrators rights in order to not fail.

3. The time WR needs to run, all but three, repairs can - IMO - be reduced by say 50%. If the issues metioned above are resolved then, I think, all the batch files simply don't need to be run twice.

The solution to solve the issues mentioned above, require changes in the program code of the batch files. I already have send you an email with some details of what needs to be changed.

4. I think "Repair WMI" can be improved. The internet provided some interesting info.

5. WR tries to register a number of files but fails because it targets the wrong folder(s) (See reply #80 in this thread). I used a program "SearchMyFiles" to determine in which folder(s) a number of files are located on my Win 7 machine. It also can show e.g. hidden & system files. Excellent program, IMO. Much better than e.g. "Everything" (www.voidtools.com).
Source: http://www.nirsoft.net/utils/search_my_files.html

6. The thoughts behind the suggestion to register "Service" files are these: I noticed that a number of names in Task Manager (Services) and files in the "System32" folder are similar. Thatīs why I thought these Files\Services could/can be (re-)registered.

Watch your email inbox for more/additional details !!
« Last Edit: March 14, 2013, 05:37:32 AM by Willy2 »

Offline Willy2

  • Hero Member
  • *****
  • Join Date: Oct 2011
  • Posts: 1116
  • Karma: 18
    • View Profile
Re: Window Repair 1.9.2
« Reply #85 on: March 14, 2013, 08:39:32 PM »
I experienced another weird thing. It could be "psexec.exe" related.

When I run WR with e.g. only "Set Services to Default" selected then two CMD.exe windows open to run a number of commands. In both cases the header of the CMD.exe window says "Administrator: ....".

But I see a different behaviour when I manually open CMD.exe under my User Account. Then there's no text "Administrator" in the header of CMD.exe. Windows also offers the opportunity to run CMD.exe with Administrator rights (right click). Then in the header that word "Administrator" does show up.

Consider the next 4 commands:
"net stop ........."
"net start ........."
"sc config ......... start= ......."
"pause"


When I (manually) run a batch file with these 4 commands in a CMD.exe window under my (default) User Account the first three commands all generate an error ("Access Denied"). But when I (manually) run these commands with Administrator rights then no error is generated. Windows "swallows" those commands without any comments.

All this behaviour, as described above, leads me to believe that "psexec.exe" could "push" WR into "Administrator Mode". And that could explain why a number of repairs (with e.g. "net start" commands) won't fail in spite of being run under my User Account.
« Last Edit: March 15, 2013, 06:27:50 AM by Willy2 »

Offline Shane

  • Top Geek, err uh Dog.
  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9280
  • Location: USA
  • Karma: 138
  • "Knowledge should be shared not hidden."
    • View Profile
    • Tweaking.com
Re: Window Repair 1.9.2
« Reply #86 on: March 15, 2013, 06:30:20 PM »
The manifest file with the program tells windows to run my program with administrator rights. But it is still under the current user account.

psexec.exe is used to run cmd.exe under the system account. Which also has administrator rights and then some.

So the cmd.exe window will say administrator at the top for both. Thats just how they made it. I dont think they ever though cmd.exe would be run under the system account so it doesnt say. It saying administrator in the title is just a way to let you now that cmd.exe has higher permissions than normal.

Shane
PLEASE EDIT YOUR TOPIC AND PUT (SOLVED) IF YOU ARE ALL FIXED.

(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline Willy2

  • Hero Member
  • *****
  • Join Date: Oct 2011
  • Posts: 1116
  • Karma: 18
    • View Profile
Re: Window Repair 1.9.2
« Reply #87 on: March 16, 2013, 01:42:21 AM »
Ah. your reply eliminates enough (not all) question marks.

I've gone through all the batch files and I have a found a number of issues. I found that not only "Register System Files" and "Repair Internet Explorer" - in some special circumstances - could/would fail. I found that "Repair MSJET & MDAC" can fail also in some circumstances, as well. The proposed code changes will - IMO - improve the reliabilty of those repairs.

When the program code has been updated/improved (following my proposals) then you can - IMO - get rid of running the batch files twice. Saves - IMO - a significant amount of time.

See the emails I have sent you. I am done. I can't find any flaws/bugs in the batch files anymore. Now it's up to you to see whether you like the proposals or not. And to include them in the programcode.

Offline Willy2

  • Hero Member
  • *****
  • Join Date: Oct 2011
  • Posts: 1116
  • Karma: 18
    • View Profile
Re: Window Repair 1.9.2
« Reply #88 on: March 16, 2013, 06:07:57 AM »
I'll provide more details why "Repair IE" & "Repair MSJET & MSDAC" fail when run under a user account. Take e.g. the line (in "Repair Internet Explorer"):

- "regsvr32 -s dispex.dll"

The "Path=" command tells Windows in what folders to look for the "Regsvr32" command/file. But "Path=" doesn't tell Windows in which folder the file "dispex.dll" is located. So, Windows starts looking for this file in the active folder. And that's where the problems begin. The active folder, when WR runs under a user account, could be "C:\Program files\WR v1.9.12". But Windows can't find ""dispex.dll" in that active folder. Surprise, surprise. Because "dispex.dll" is located in the "%windir%\system32" and/or "%windir%\syswow64" folder.

So, in order to make the registration of this file work, this particular line should be replaced by two lines:
- "regsvr32 -s %windir%\system32\dispex.dll"
- "regsvr32 -s %windir%\syswow64\dispex.dll"

And then - IMO - you could get rid of running the batch files twice. Saves time, right ? And there're a number of other "active folder" & "path" problems as well. Again, see my email.
« Last Edit: March 17, 2013, 11:26:07 AM by Willy2 »

Offline Shane

  • Top Geek, err uh Dog.
  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9280
  • Location: USA
  • Karma: 138
  • "Knowledge should be shared not hidden."
    • View Profile
    • Tweaking.com
Re: Window Repair 1.9.2
« Reply #89 on: March 16, 2013, 01:47:01 PM »
You know, your my best tester. Why is it we have never just talked on chat instead of email and the forums? lol

Shane
PLEASE EDIT YOUR TOPIC AND PUT (SOLVED) IF YOU ARE ALL FIXED.

(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline Willy2

  • Hero Member
  • *****
  • Join Date: Oct 2011
  • Posts: 1116
  • Karma: 18
    • View Profile
Re: Window Repair 1.9.2
« Reply #90 on: March 16, 2013, 05:11:42 PM »
What about time differences ? You're on Pacific Standard Time (US West Coast). The capitol of the Netherlands (the country I live in) is Amsterdam. And the time difference is 9 (!!) hours. See the weblink below.

http://www.timeanddate.com/worldclock/
« Last Edit: March 16, 2013, 05:27:30 PM by Willy2 »

Offline Shane

  • Top Geek, err uh Dog.
  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9280
  • Location: USA
  • Karma: 138
  • "Knowledge should be shared not hidden."
    • View Profile
    • Tweaking.com
Re: Window Repair 1.9.2
« Reply #91 on: March 17, 2013, 01:50:28 PM »
Yes but I have crazy freaking hours that I keep lol. Sometimes I go to bed at 11 PM, sometimes I go to bed at 5 am. Sometimes I am awake at 6 am and sometimes I wake up at 11 am LOL

Running a computer repair business, 2 websites, 2 forums, over 60 programs and my 4 kids and my wife I dont have a clue what a normal sleep schedule is like :-)

Shane
PLEASE EDIT YOUR TOPIC AND PUT (SOLVED) IF YOU ARE ALL FIXED.

(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline Willy2

  • Hero Member
  • *****
  • Join Date: Oct 2011
  • Posts: 1116
  • Karma: 18
    • View Profile
Re: Window Repair 1.9.2
« Reply #92 on: March 22, 2013, 07:22:49 AM »
One thing that annoys me (a tiny) bit and that can be improved: when the user has ticked the option "Restart/Shutdown System when finished" then the log pane still says "You must restart the program". Perhaps you can let WR check whether this option has been ticked and if that's the case then don't display that text.