Need some help with a batch file

BlackHawkBlackHawk Bible music connoisseurThere's no place like 127.0.0.1 Icrontian
edited December 2003 in Science & Tech
Windows has no <3 for me :bawling:

Ok so I'm trying to do a automated installation of XP. To customize it more, I'm adding a batch file so that it installas some programs, registry tweaks and deletes some stuff. The only problem is that I know very little of batch files. My current problem is that the programs aren't installaing. Could someone tell me what's wrong with this?

Sorry for the long list :o
CLS
@ECHO OFF
ECHO Ejecting CD-ROM Drives
START %SYSTEMDRIVE%\Install\CD.VBS
ECHO.
ECHO CD-ROM Drives have been ejected.
ECHO.
ECHO.
ECHO Removing unnecessary files.
ECHO Please wait...
DEL /F/S/Q %SYSTEMROOT%\System32\DllCache
DEL /F/S/Q %SYSTEMROOT%\Driver Cache\i386
DEL /F/S/Q %SYSTEMROOT%\Help
DEL /F/Q %SYSTEMROOT%\inf mdm*.*
DEL /F/S/Q %SYSTEMROOT%\srchasst
DEL /F/S/Q %SYSTEMROOT%\System32\usmt
DEL /F/S/Q %SYSTEMROOT%\Msagent
DEL /F/S/Q "C:\Program Files\Netmeeting"
ECHO.
ECHO Files have been removed.
ECHO.
ECHO.
ECHO Removing wallpapers.
ECHO Please wait...
DEL "%systemroot%\Blue Lace 16.bmp"
DEL "%systemroot%\Coffee Bean.bmp"
DEL "%systemroot%\FeatherTexture.bmp"
DEL "%systemroot%\Gone Fishing.bmp"
DEL "%systemroot%\Greenstone.bmp"
DEL "%systemroot%\Prairie Wind.bmp"
DEL "%systemroot%\Rhododendron.bmp"
DEL "%systemroot%\River Sumida.bmp"
DEL "%systemroot%\Santa Fe Stucco.bmp"
DEL "%systemroot%\Soap Bubbles.bmp"
DEL "%systemroot%\Zapotec.bmp"
DEL "%systemroot%\Web\Wallpaper\Crystal.jpg"
DEL "%systemroot%\Web\Wallpaper\Moon flower.jpg"
DEL "%systemroot%\Web\Wallpaper\Purple flower.jpg"
DEL "%systemroot%\Web\Wallpaper\Radiance.jpg"
DEL "%systemroot%\Web\Wallpaper\Ripple.jpg"
DEL "%systemroot%\Web\Wallpaper\Stonehenge.jpg"
DEL "%systemroot%\Web\Wallpaper\Vortec space.jpg"
DEL "%systemroot%\Web\Wallpaper\Ascent.jpg"
DEL "%systemroot%\Web\Wallpaper\Autumn.jpg"
DEL "%systemroot%\Web\Wallpaper\Azul.jpg"
DEL "%systemroot%\Web\Wallpaper\Red moon desert.jpg"
DEL "%systemroot%\Web\Wallpaper\Tulips.jpg"
DEL "%systemroot%\Web\Wallpaper\Bliss.bmp"
DEL "%systemroot%\Web\Wallpaper\Follow.jpg"
DEL "%systemroot%\Web\Wallpaper\Friend.jpg"
DEL "%systemroot%\Web\Wallpaper\Home.jpg"
DEL "%systemroot%\Web\Wallpaper\Peace.jpg"
DEL "%systemroot%\Web\Wallpaper\Power.jpg"
DEL "%systemroot%\Web\Wallpaper\Wind.jpg"
DEL "%systemroot%\Web\Wallpaper\Windows XP.jpg"
ECHO.
ECHO Wallpapers deleted.
ECHO.
ECHO.
ECHO Deleting screensavers.
ECHO Please wait...
DEL "%systemroot%\system32\scrnsave.scr"
DEL "%systemroot%\system32\ss3dfo.scr"
DEL "%systemroot%\system32\ssbezier.scr"
DEL "%systemroot%\system32\ssflwbox.scr"
DEL "%systemroot%\system32\ssmarque.scr"
DEL "%systemroot%\system32\ssmypics.scr"
DEL "%systemroot%\system32\ssmyst.scr"
DEL "%systemroot%\system32\sspipes.scr"
DEL "%systemroot%\system32\ssstars.scr"
DEL "%systemroot%\system32\sstext3d.scr"
ECHO Screensavers deleted.
ECHO.
ECHO.
ECHO Installing Windows Media Player 9.
ECHO Please wait...
START /wait "%Systemroot%\Install\Windows Media Player\Windows Media Player 9.exe" /Q:A /R:N
ECHO.
ECHO Windows Media Player 9 installed.
ECHO.
ECHO.
ECHO Applying registry and services tweaks.
ECHO Please wait...
REGEDIT /S "%Systemroot%\Install\reg tweak.reg"
ECHO.
ECHO Registry tweaks complete
ECHO.
REGEDIT /S "%Systemroot%\Install\tweaked services.reg"
ECHO.
ECHO System services tweak complete.
ECHO.
ECHO.
ECHO Installing WinRAR 3.20
ECHO Please wait...
START /wait "%Systemroot%\Install\WinRAR\WinRAR v320.exe" /s
ECHO.
ECHO WinRAR 3.20 installed
ECHO.
ECHO.
ECHO Installing Nero Burning ROM v6.0.0.19
ECHO Please wait...
START /wait "%Systemroot%\Install\Nero\Nero v60019.exe" /silent /noreboot
ECHO.
ECHO Nero Burning ROM installed
ECHO.
ECHO Registering NERO Burning ROM
REGEDIT /S "%Systemroot%\Install\Nero\register.reg"
ECHO Nero Burning ROM is now registered to Raul Munoz
EcHO.
ECHO.
ECHO Installing Norton Antivirus 2003 Professional
ECHO Please wait...
START /wait "%Systemroot%\Install\Norton Antivirus\NAV\NAV.msi" /QB
ECHO.
ECHo Norton Antivirus 2003 installed
ECHO.
ECHO.
ECHO Installing DirectX 9.0b.
ECHO Please wait...
START /wait "%Systemroot%\Install\DirectX 9\dxsetup.exe" /opk
ECHO.
ECHO DirectX 9.0b installed
ECHO.
ECHO.
ECHO Installing ATI Control Panel for Catalyst 3.9
ECHO Please wait...
START /wait "%Systemroot%\Install\Drivers\ATI Catalyst 39\Control Panel\Setup.exe" /s /f1 %Systemroot%\Install\Drivers\ATI Catalyst 39\Control Panel\setup.iss
ECHO.
ECHO ATi Control Panel for Catalyst 3.9 installed
ECHO.
ECHO.
ECHO File installations are complete. You're so 1337.
ECHo.
ECHO.
ECHO.
ECHO Preparing to shutdown in 5 seconds.
ECHO.
ECHO.
SHUTDOWN -f -r -t 5

Comments

  • EMTEMT Seattle, WA Icrontian
    edited December 2003
    What do you mean, "The programs aren't installing"? The ones that are installed with a .reg or with 'start'? Which calls, to what? Need more info.
  • BlackHawkBlackHawk Bible music connoisseur There's no place like 127.0.0.1 Icrontian
    edited December 2003
    With "START" like Nero, WMP, WinRAR. I know spaces don't work in the command line but when I use quotes, the switches don't seem to work.
  • EMTEMT Seattle, WA Icrontian
    edited December 2003
    Hmm.. if you type the command by itself on the command line what does it do? What does it do when the batch file tries it?

    You might also try taking out the 'start' bits (just calling the exe) when it's start /wait. Not much difference afaik.

    Cool idea btw. I'm sure it's been done before but it looks nice.
  • BlackHawkBlackHawk Bible music connoisseur There's no place like 127.0.0.1 Icrontian
    edited December 2003
    Well removing "START /wait" and changing %systemroot% to C: seemed to work. Thanks. I've been hrs just messing with this stuff.
  • shwaipshwaip bluffin' with my muffin Icrontian
    edited December 2003
    i don't know if this was part of the problem, but %systemroot% takes you to the windows directory.
  • mmonninmmonnin Centreville, VA
    edited December 2003
    Batch files are cool. Time savers as well.

    I worked in the tech office at school. They have batch files for all the proggies they want installed on different OSs. All I had to do was click once and the next install would start.
Sign In or Register to comment.