Tweaking.com Support Forums

Main Forum => Feedback & Suggestions => Topic started by: Willy2 on November 18, 2021, 07:42:22 pm

Title: Code improvement for WR
Post by: Willy2 on November 18, 2021, 07:42:22 pm
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
)
Title: Re: Code improvement for WR
Post by: Boggin on November 19, 2021, 04:42:30 am
I've emailed Shane with a link to your thread for his consideration.