Jump to content

Any errors in this batch script?


Recommended Posts

just wished if any1 could find some possible errors with this script:

@ECHO OFF

TITLE IMPORTANT SYSTEM TASKS

COLOR 03

ECHO.

ECHO REGISTERING SHIMGVW.DLL

regsvr32 /i /s "%WinDir%\system32\shimgvw.dll"

ECHO.

ECHO RUNNING THE XP SP3 GENUINE ADVANTAGE TOOL

START "" /I /WAIT "%systemdrive%\install\installer.bat"

ECHO.

ECHO ACTIVATING WINRAR

COPY "%systemdrive%\install\rareg.key" "%systemdrive%\Program Files\WinRAR" /V /Y 1>nul

ECHO.

ECHO Deleting default Internet Explorer Favorite Links...

RMDIR /S /Q "%UserProfile%\Favorites\Links"

RMDIR /S /Q "%UserProfile%\Favorites\Microsoft Websites"

ECHO.

ECHO Adding new Internet Explorer Favorite Links...

START "" /I /WAIT "%systemdrive%\install\IE Favorite Links.bat"

ECHO.

ECHO Installing: Windows XP Security Update for CAPICOM (KB931906) v2102

ECHO Please wait...

START "" /I /WAIT "%SYSTEMDRIVE%\install\Windows XP Security Update for CAPICOM (KB931906) v2102.exe" /q

ECHO.

ECHO Installing: Foxit Reader v3.0 Build 1506

ECHO Please wait...

START "" /I /WAIT "%SYSTEMDRIVE%\install\Foxit Reader v3.0 Build 1506.exe" /i

ECHO.

ECHO Iconising Taskbar

START "" /B /WAIT "%systemdrive%\install\Install.reg" /Y

ECHO.

ECHO Cleaning up temporary setup files

RMDIR /S /Q "%SYSTEMDRIVE%\install"

ECHO.

ECHO FINISHED---FINISHED---FINISHED

ECHO.

PAUSE

EXIT

hope any1 could help me out with this .cmd file as I had encountered sum problems with it....

Edited by absclaw
Link to comment
Share on other sites


A quick glance just reveals one error in :

ECHO Iconising Taskbar
START "" /B /WAIT "%systemdrive%\install\Install.reg" /Y

You need 'regedit /s' to merge a regfile silently...

Other than that, then for nitpicking:

'/y' parameter is redundant in the 'copy' command when run from a NT command script.

'/i' parameter is redundant in your 'regsvr32' commands.

.cmd is more appropriate than .bat on NT systems.

'rd' is the same as the older 'rmdir'.

lastly, maybe i'm wrong here, and just ignore this, but in my personal experience, then 'start "" /wait' dosen't make a difference, as the NT command interpreter by default waits for completion, and in cases where it dosen't, then that command don't make a difference, since it's because a program runs another process...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...