Main Forum > Feedback & Suggestions

Code improvement for WR

(1/1)

Willy2:
I have a proposal to "Clean up" the program code in Windows Repair (WR). WR runs a number of MSDOS command in several repairs and those commands can "cleaned up". Inside WR one can find a sequence of commands something like this (in bold & italics):

REM register an number of files in the "System32" folder:

regsvr32.exe   file.dll /s
regsvr32.exe   file2.dll /s
regsvr32.exe   file3.dll /s

REM test if a computer is a 32 bit or 64 bit system

IF NOT EXIST "C:\windows\syswow64\regsvr32.exe  goto nextcode

REM register a files number of files in the "Syswow64" folder
REM target the "Syswow64" folder.

regsvr32.exe  file.dll /s
regsvr32.exe  file2.dll /s
regsvr32.exe  file3.dll /s

.nextcode



This piece of code contains a "goto" command and that's NOT recommended.

The lines that target the "Syswow64" folder can be improved/cleaned up. Those lines in WR can replace that with slightly different code that also would target the "Syswow64" folder. Instead of using "goto" WR can use a slightly different "IF" code and NO "goto".

Then the lines that target the "syswow64" folder (see the example above) would become something like this (in bold italics):

REM test if a computer is a 32 bit or 64 bit system

IF EXIST "C:\windows\syswow64\regsvr32.exe  (

REM register a files number of files in the "Syswow64" folder
regsvr32.exe  file.dll /s
regsvr32.exe  file2.dll /s
regsvr32.exe  file3.dll /s
)

Boggin:
I've emailed Shane with a link to your thread for his consideration.

Navigation

[0] Message Index

Go to full version