Jump to content

Unattended GuiRunFirst batch file problem


Recommended Posts

Hi.

I'm now having the installation of my dreams, for XP that is... but after the first time it runs on the ]GuiRunFirst[ i get errors from the batch file.

It seems that i can't get files out of directories when there are spaces in the directory name.

i've tried adding " for the names or on the whole line.. but it didn't work.

example:

@echo off
TITLE Installing components of Windows XP Professional.

echo.
echo Over the next few minutes you will see automated installations
echo of various sofware applications, windows updates, and registry
echo tweaks being implemented. The computer will restart automatically
echo once the whole process has finished!

echo.
echo Windows Comspec settings
echo systemdrive:    [%systemdrive%]
echo systemroot:     [%systemroot%]
echo alluserprofile: [%allusersprofile%]
echo.

echo.
echo Installing WinZip 9.0
start /wait "%systemdrive%\Program Files\winzip\winzip32.exe" /noqp /autoinstall
echo Installation complete!
echo.
echo Adding and removing registry items... please wait...
regedit /s registerwinzip.reg

echo.
echo Installing Total Commander 6.53
start /wait "%systemdrive%\Install\Tools\TotalCommander6.53\Install.exe"
echo.
echo Adding registry for Total Commander 6.53
copy "%systemdrive%\Install\Tools\TotalCommander6.53\Wincmd.key" "%systemdrive%\Program Files\totalcmd\"

echo.
echo Installing Daemon Tools 3.47
start /wait "%systemdrive%\install\tools\dtools\daemon.msi" -qb REBOOT=ReallySuppress

echo.
echo Installing WinAMP 5.093...
start /wait "%systemdrive%\install\music\winamp5093.msi" INI="%systemdrive%\install\music\winamp5093.ini" /qb

echo.
echo Removing Wallpapers and Screensavers...
DEL "%systemroot%\*.bmp" >nul
DEL "%systemroot%\Web\Wallpaper\*.jpg" >nul
DEL "%systemroot%\system32\dllcache\*.scr" >nul
DEL "%systemroot%\system32\*.scr" >nul

echo Removing useless shortcuts...
DEL "%systemdrive%\Documents and Settings\All Users\Start Menu\Windows Update.lnk" >nul
DEL "%systemdrive%\Documents and Settings\All Users\Start Menu\Set Program Access and Defaults.lnk" >nul
DEL "%systemdrive%\Documents and Settings\All Users\Start Menu\Windows Catalog.lnk" >nul

echo Removing Winzip Profiles...
del "%allusersprofile%\start menu\WinZip.lnk" >nul
del "%allusersprofile%\desktop\WinZip.lnk" >nul
del "%allusersprofile%\start menu\Programs\WinZip\Uninstall WinZip.lnk" >nul
del "%allusersprofile%\start menu\Programs\WinZip\Help Manual.lnk" >nul
del "%allusersprofile%\start menu\Programs\WinZip\ReadMe.txt.lnk" >nul
del "%allusersprofile%\start menu\Programs\WinZip\What's New.lnk" >nul

echo.
echo Restarting the PC in 1 minute...
shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute, this will give enough time for the shortcuts to update and for the shell to fully load before its ready to restart!"

echo.
echo Deleting Temp Installation Files...
RD /S /Q %systemdrive%\install
RD /S /Q %systemdrive%\drivers

EXIT

even the Removing useless shortcuts parts cannot be found wich i find very weird.

is there someone that can give me comments on this batchfile.

Link to comment
Share on other sites


The syntax for Start is different with XPSP2. Type Start /? at a prompt to see.

Your usage is:

Start /Wait "%SystemDrive%\....

should be:

Start /Wait "" "%SystemDrive%\.....

The 1st use of "" is for the title of the cmd window.

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...