pdmcmahon Posted September 8, 2004 Posted September 8, 2004 Just in case anyone is interested, the following batch_file.cmd has worked wonders for me, I am sure most of you can see what it does by reading it. Enjoy CLS@echo offTITLE Unattended Installation - Do NOT touch your mouse or keyboard!!!ECHO.ECHO Starting installation of ApplicationsECHO Installing .NET Framework v1.1ECHO Please wait...start /wait %systemdrive%\install\Apps\DOTNETFW\NETFX.msi /qbECHO.ECHO Installing .NET Framework v1.1 SP1ECHO Please wait...start /wait %systemdrive%\install\Apps\DOTNETSP1\SETUP.exe /QECHO.ECHO Installing Active Ports 1.4ECHO Please wait...start /wait %systemdrive%\install\Apps\ACTIVEPORTS\SETUP.exe /staskkill.exe /F /IM explorer.exeECHO.ECHO Installing Adobe Acrobat Reader 6.0.2 CEECHO Please wait...start /wait %systemdrive%\install\Apps\AARDR602\SETUP.exe -p"-s /v\"/qn\""ECHO.ECHO Installing ALT+TAB EnhancerECHO Please wait...start /wait %systemdrive%\install\Apps\ALTTAB\setup.exeECHO.ECHO Installing Daemon Tools 3.46ECHO Please wait...start /wait %systemdrive%\install\Apps\DaemonTools\daemon.msi /qb REBOOT=SuppressECHO.ECHO Installing Executive Software Diskeeper 8.0.459ECHO Please wait...start /wait %systemdrive%\install\Apps\Diskeeper8\setup.exe /s /v/qnECHO.ECHO Installing Executive Software Diskeeper 8.0.478 UpdateECHO Please wait...start /wait %systemdrive%\install\Apps\Diskeeper8_Update\setup.exe /s /v/qnECHO.ECHO Installing FlashFXP FTP Client 2.1ECHO Please wait...start /wait %systemdrive%\install\Apps\FLASH_FXP\SETUP.exe /silentECHO.ECHO Installing FlashFXP FTP Client 2.1 Registration PatchECHO Please wait...start /wait %systemdrive%\install\Apps\FLASH_FXP_PATCH\SETUP.exeECHO.ECHO Installing Image ResizerECHO Please wait...start /wait %systemdrive%\install\Apps\IMAGERES\SETUP.msi /qbECHO.ECHO Installing Irfanview 3.91ECHO Please wait...start /wait %systemdrive%\install\Apps\IRFAN\SETUP.exe /silent /desktop=0 /group=0 /allusers=1 /assoc=1ECHO.ECHO Installing Irfanview 3.91 PluginsECHO Please wait...start /wait %systemdrive%\install\Apps\IRFANP\SETUP.exe /silentECHO.ECHO Installing Macromedia Flash Player 7 including Shockwave 10 ECHO Please Wait...start /wait %systemdrive%\install\Apps\FLASH\SETUP.exe /sECHO.ECHO Installing Microsoft Java Virtual Machine (Build 3810)ECHO Please wait...start /wait %systemdrive%\install\Apps\MSJAVA3810\SETUP.exeECHO.ECHO Installing Nero 6.3.1.20ECHO Please wait...start /wait %systemdrive%\install\APPS\NERO\SETUP.exe /silent /noreboot /no_ui /sn=XXXX-XXXX-XXXX-XXXX-XXXX-XXXX /write_snECHO.ECHO Installing Quicktime 6.5.1ECHO Please wait...start /wait %systemdrive%\install\APPS\QUICKTIME\SETUP.exeECHO.ECHO Installing SpyBot Search and Destroy 1.3ECHO Please Wait...start /wait %systemdrive%\install\Apps\SPYBOT\SETUP.exe /silentECHO.ECHO Installing Sun Java Virtual Machine 1.4.2_05ECHO Please Wait...start /wait %systemdrive%\install\Apps\SunJava\SETUP.exe /S /v/qn IEXPLORER=1ECHO.ECHO Installing Symantec Antivirus Corporate 9.0 Build 338ECHO Please wait...start /wait %systemdrive%\install\Apps\Sav9\SAV.msi /qn RUNLIVEUPDATE=1 REBOOT=REALLYSUPPRESSECHO.ECHO Installing Windows Media Player 10.0.0.3646 Final EditionECHO Please wait...start /wait %systemdrive%\install\Apps\WMP10\SETUP.exe /Q:A /R:NECHO.ECHO Installing WinRAR 3.0ECHO Please wait...start /wait %systemdrive%\install\Apps\WINRAR30\SETUP.exe /sECHO.ECHO Installing WinRAR 3.0 PatchECHO Please wait...start /wait %systemdrive%\install\Apps\WINRAR30_PATCH\SETUP.exetaskkill.exe /F /IM explorer.exeECHO Cleaning up user accountsECHO.ECHO Deleting .NET Framework Accountnet user ASPNet /deleteECHO Deleting Vendor Support User Accountnet user Support_388945a0 /deleteECHO Deleting Vendor Assistant User Accountnet user HelpAssistant /deleteECHO.ECHO Removing and Modifying Shortcuts...ECHO.ECHO Applying cleanup to Start Menu icons...RD /S /Q "c:\Documents and Settings\All Users\Start menu\Programs"RD /S /Q "c:\Documents and Settings\Default User\Start menu\Programs"RD /S /Q "c:\Documents and Settings\Administrator\Start Menu\Programs"DEL "c:\Documents and Settings\All Users\Start menu\Set Program Access and Defaults.lnk"DEL "c:\Documents and Settings\All Users\Start menu\Windows Catalog.lnk"DEL "c:\Documents and Settings\All Users\Start menu\Windows Update.lnk"MD "c:\Documents and Settings\All Users\Start Menu\Programs"MD "c:\Documents and Settings\Default User\Start Menu\Programs"MD "c:\Documents and Settings\Administrator\Start Menu\Programs"XCOPY /S /E /I "%systemdrive%\install\ICONS" "c:\Documents and Settings\All Users\Start Menu\Programs"XCOPY /S /E /I /Y "%systemdrive%\INSTALL\Apps\QUICKTIME\QuickTime.qtp" "c:\Documents and Settings\All Users\Application Data\Quicktime"DEL "c:\Documents and Settings\All Users\Desktop\Nero StartSmart.lnk"DEL "c:\Documents and Settings\All Users\Desktop\Adobe Reader 6.0 CE.lnk"DEL "c:\Documents and Settings\All Users\Desktop\File a bug.lnk"DEL "c:\Documents and Settings\All Users\Desktop\DAEMON Tools.lnk"DEL "c:\Documents and Settings\All Users\Desktop\QuickTime Player.lnk"DEL "c:\Documents and Settings\Administrator\Desktop\Spybot - Search & Destroy.lnk"DEL "c:\Documents and Settings\Administrator\Desktop\Windows Media Player.lnk"DEL "c:\Documents and Settings\Administrator\My Documents\My Pictures\Sample Pictures.lnk"DEL "c:\Documents and Settings\Administrator\My Documents\My Music\Sample Music.lnk"MOVE "c:\Documents and Settings\Administrator\Favorites" "c:\Documents and Settings\Administrator\My Documents\"ECHO.ECHO Removing Wallpapers and ScreensaversDEL "c:\windows\*.bmp"DEL "c:\windows\Web\Wallpaper\*.jpg"DEL "c:\windows\system32\dllcache\*.scr"DEL "c:\windows\system32\*.scr"ECHO.ECHO Applying "OPER_SYS" label to C: Drivelabel c: OPER_SYSECHO.ECHO Adding /SOS switch to boot.ini file to list services that are loading on Windows Startup...bootcfg /addsw /SO /ID 1ECHO.ECHO Changing OS choice timeout to 3 seconds in boot.ini...bootcfg /timeout 3ECHO.ECHO Applying Registry Tweaks...REGEDIT /S %systemdrive%\install\RegTweaks.regECHO.ECHO Restarting the PC in 30 seconds...shutdown -r -f -t 30 -c "Windows XP will now restart in 30 seconds, after this final reboot, your computer is ready to use!"ECHO.ECHO Deleting Temp Installation Files...RD /S /Q %systemdrive%\installRD /S /Q %systemdrive%\sysprepRD /S /Q %systemdrive%\driversECHO.EXIT
pdmcmahon Posted September 8, 2004 Author Posted September 8, 2004 Also, here is the Quicktimeinstaler.ini that I include in the QT directory[QTSETUP]32Bit=FALSE16BIT=FALSENO_DIALOGS=TRUESHOW_SAMPLE=FALSESHOW_README=FALSESHOW_PROGRAMFOLDER=FALSEREGISTRATION_DIALOG=FALSELICENSE_OPTION=2SUPPRESS_SPEED_DIALOG=TRUESUPPRESS_PROXY_DIALOG=TRUEINSTALL_QTJAVA=FALSEINSTALL_QD3D=TRUEINSTALL_QTINFO=TRUE[QTPREFS]SHOW_HOTPICKS=FALSEConnectionSpeed=1.5 Mbps T1/Intranet/LANCSMultipleStreams=0
evilvoice Posted September 8, 2004 Posted September 8, 2004 this doesnt look to be workingECHO.ECHO Adding /SOS switch to boot.ini file to list services that are loading on Windows Startup...bootcfg /addsw /SO /ID 1notice the missing S?
pdmcmahon Posted September 9, 2004 Author Posted September 9, 2004 You don't need it, I have that in my install batch and it works fine
Noise Posted September 9, 2004 Posted September 9, 2004 Wow, IMHO this is the perfect type of setup, it's exactly what I do - almost exactly. Kinda scary really (checks PC for trojans) I'm curious about a few programs you're installing...I notice you're using Adobe Acrobat Reader 6.0.2 CE - how is that working for you? Is it the same as the regular USA version of Acrobat Reader 6.01 that has been updated to 6.02? Does it use the Brittish spelling of words like colour?What is ActivePorts?What is the Image resizer?Have you ran into any problems deleting the asp, support and help accounts?Thanks again for posting this. Very nice. Very professional. You're hired.
pdmcmahon Posted September 9, 2004 Author Posted September 9, 2004 First let me answer those questions for you, then below, I will post my updated batch. Sorry, but I work on this and update it multiple times a day because I am just a freak like that I pulled the Adobe install from http://www.adobe.com/products/acrobat/alternate.html, I was looking for a small, senf contained install. It seems to work okay, but I noticed there is NO update applet in this version. I think I realized just now that CE is the Central European version. OOPS Active Ports is a sweet little freebie I found on http://www.download.com/3000-2085-10062969...page&tag=buttonIt lets you monitor open ports and resolve IPs of who is looking in on you. It is not firewall, just informative as to your status.Image Resizer is a Windows XP Powertoy. It is located on http://www.microsoft.com/windowsxp/downloa...ppowertoys.mspx, same location as the ALT+TAB EnhancerAs far as the deleted accounts, I don't know if they are specific to the Volume License version of Windows I am using. If you are using the same CD, I would just REM those lines and then see which users get created, they are bound to be the same exact name every time. Then, just add those lines in your batch.**************************************************************HERE IS MY UPDATED BATCH:CLS@echo offTITLE Unattended Installation - Do NOT touch your mouse or keyboard!!!ECHO.ECHO Starting installation of ApplicationsECHO Installing .NET Framework v1.1ECHO Please wait...start /wait %systemdrive%\install\Apps\DOTNETFW\NETFX.msi /qbECHO.ECHO Installing .NET Framework v1.1 SP1ECHO Please wait...start /wait %systemdrive%\install\Apps\DOTNETSP1\SETUP.exe /QECHO.ECHO Installing Active Ports 1.4ECHO Please wait...start /wait %systemdrive%\install\Apps\ACTIVEPORTS\SETUP.exe /staskkill.exe /F /IM explorer.exeECHO.ECHO Installing Adobe Acrobat Reader 6.0.2 CEECHO Please wait...start /wait %systemdrive%\install\Apps\AARDR602\SETUP.exe -p"-s /v\"/qn\""ECHO.ECHO Installing ALT+TAB EnhancerECHO Please wait...start /wait %systemdrive%\install\Apps\ALTTAB\setup.exeECHO.ECHO Installing Daemon Tools 3.46ECHO Please wait...start /wait %systemdrive%\install\Apps\DaemonTools\daemon.msi /qb REBOOT=SuppressECHO.ECHO Installing Executive Software Diskeeper 8.0.459ECHO Please wait...start /wait %systemdrive%\install\Apps\Diskeeper8\setup.exe /s /v/qnECHO.ECHO Installing Executive Software Diskeeper 8.0.478 UpdateECHO Please wait...start /wait %systemdrive%\install\Apps\Diskeeper8_Update\setup.exe /s /v/qnECHO.ECHO Installing FlashFXP FTP Client 2.1ECHO Please wait...start /wait %systemdrive%\install\Apps\FLASH_FXP\SETUP.exe /silentECHO.ECHO Installing FlashFXP FTP Client 2.1 Registration PatchECHO Please wait...start /wait %systemdrive%\install\Apps\FLASH_FXP_PATCH\SETUP.exeECHO.ECHO Installing Image ResizerECHO Please wait...start /wait %systemdrive%\install\Apps\IMAGERES\SETUP.msi /qbECHO.ECHO Installing Irfanview 3.91ECHO Please wait...start /wait %systemdrive%\install\Apps\IRFAN\SETUP.exe /silent /desktop=0 /group=0 /allusers=1 /assoc=1ECHO.ECHO Installing Irfanview 3.91 PluginsECHO Please wait...start /wait %systemdrive%\install\Apps\IRFANP\SETUP.exe /silentECHO.ECHO Installing Macromedia Flash Player 7 including Shockwave 10 ECHO Please Wait...start /wait %systemdrive%\install\Apps\FLASH\SETUP.exe /sECHO.ECHO Installing Microsoft Java Virtual Machine (Build 3810)ECHO Please wait...start /wait %systemdrive%\install\Apps\MSJAVA3810\SETUP.exeECHO.ECHO Installing Nero 6.3.1.20ECHO Please wait...start /wait %systemdrive%\install\APPS\NERO\SETUP.exe /silent /noreboot /no_ui /sn=XXXX-XXXX-XXXX-XXXX-XXXX-XXXX /write_snECHO.ECHO Installing Quicktime 6.5.1ECHO Please wait...start /wait %systemdrive%\install\APPS\QUICKTIME\SETUP.exeECHO.ECHO Installing SpyBot Search and Destroy 1.3ECHO Please Wait...start /wait %systemdrive%\install\Apps\SPYBOT\SETUP.exe /silentECHO.ECHO Installing Sun Java Virtual Machine 1.4.2_05ECHO Please Wait...start /wait %systemdrive%\install\Apps\SunJava\SETUP.exe /S /v/qn IEXPLORER=1ECHO.ECHO Installing Symantec Antivirus Corporate 9.0 Build 338ECHO Please wait...start /wait %systemdrive%\install\Apps\Sav9\SAV.msi /qn RUNLIVEUPDATE=1 REBOOT=REALLYSUPPRESSECHO.ECHO Installing Windows Media Player 10.0.0.3646 Final EditionECHO Please wait...start /wait %systemdrive%\install\Apps\WMP10\SETUP.exe /Q:A /R:NECHO.ECHO Installing WinRAR 3.0ECHO Please wait...start /wait %systemdrive%\install\Apps\WINRAR30\SETUP.exe /sECHO.ECHO Installing WinRAR 3.0 PatchECHO Please wait...start /wait %systemdrive%\install\Apps\WINRAR30_PATCH\SETUP.exetaskkill.exe /F /IM explorer.exeECHO Cleaning up user accountsECHO.ECHO Deleting .NET Framework Accountnet user ASPNet /deleteECHO Deleting Vendor Support User Accountnet user Support_388945a0 /deleteECHO Deleting Vendor Assistant User Accountnet user HelpAssistant /deleteECHO.ECHO Removing and Modifying Shortcuts...ECHO.ECHO Applying cleanup to Start Menu icons...RD /S /Q "c:\Documents and Settings\All Users\Start menu\Programs"RD /S /Q "c:\Documents and Settings\Default User\Start menu\Programs"RD /S /Q "c:\Documents and Settings\Administrator\Start Menu\Programs"DEL "c:\Documents and Settings\All Users\Start menu\Set Program Access and Defaults.lnk"DEL "c:\Documents and Settings\All Users\Start menu\Windows Catalog.lnk"DEL "c:\Documents and Settings\All Users\Start menu\Windows Update.lnk"MD "c:\Documents and Settings\All Users\Start Menu\Programs"MD "c:\Documents and Settings\Default User\Start Menu\Programs"MD "c:\Documents and Settings\Administrator\Start Menu\Programs"XCOPY /S /E /I "%systemdrive%\install\ICONS" "c:\Documents and Settings\All Users\Start Menu\Programs"XCOPY /S /E /I /Y "%systemdrive%\INSTALL\Apps\QUICKTIME\QuickTime.qtp" "c:\Documents and Settings\All Users\Application Data\Quicktime"DEL "c:\Documents and Settings\All Users\Desktop\Nero StartSmart.lnk"DEL "c:\Documents and Settings\All Users\Desktop\Adobe Reader 6.0 CE.lnk"DEL "c:\Documents and Settings\All Users\Desktop\File a bug.lnk"DEL "c:\Documents and Settings\All Users\Desktop\DAEMON Tools.lnk"DEL "c:\Documents and Settings\All Users\Desktop\QuickTime Player.lnk"DEL "c:\Documents and Settings\Administrator\Desktop\Spybot - Search & Destroy.lnk"DEL "c:\Documents and Settings\Administrator\Desktop\Windows Media Player.lnk"DEL "c:\Documents and Settings\Administrator\My Documents\My Pictures\Sample Pictures.lnk"DEL "c:\Documents and Settings\Administrator\My Documents\My Music\Sample Music.lnk"MOVE "c:\Documents and Settings\Administrator\Favorites" "c:\Documents and Settings\Administrator\My Documents\"ECHO.ECHO Removing Wallpapers and ScreensaversDEL "c:\windows\*.bmp"DEL "c:\windows\Web\Wallpaper\*.jpg"DEL "c:\windows\system32\dllcache\*.scr"DEL "c:\windows\system32\*.scr"ECHO.ECHO Applying "OPER_SYS" label to C: Drivelabel c: OPER_SYSECHO.ECHO Adding /SOS switch to boot.ini file to list services that are loading on Windows Startup...bootcfg /addsw /SO /ID 1ECHO.ECHO Changing OS choice timeout to 3 seconds in boot.ini...bootcfg /timeout 3ECHO.ECHO Applying Registry Tweaks...REGEDIT /S %systemdrive%\install\RegTweaks.regECHO.ECHO Restarting the PC in 30 seconds...shutdown -r -f -t 30 -c "Windows XP will now restart in 30 seconds, after this final reboot, your computer is ready to use!"ECHO.ECHO Deleting Temp Installation Files...RD /S /Q %systemdrive%\installRD /S /Q %systemdrive%\sysprepRD /S /Q %systemdrive%\driversECHO.EXIT
pdmcmahon Posted September 9, 2004 Author Posted September 9, 2004 I should explain the line in my BATCH to copy the contents of the ICONS folder.To keep everything nice and clean, my batch deletes all of the StarMenu \ Programs directories, then copies whatever is in the ICONS folder over to c:\Documents and Settings\All Users\Start Menu\Programs. This way, I only need to maintain that one location and I don't have to go through and delete a bunch of useless README and VISIT OUR WEBSITE shortcuts line by line. I just flush out everything and drop what I want in there.
Noise Posted September 9, 2004 Posted September 9, 2004 If I may add a little comment. Since you were so nice in posting this, I'll give you a very helpful hint Make variables for your special folders at the beginning of your batch file:SET ALLUSER=%USERPROFILE%\..\All UsersSET DEFUSER=%USERPROFILE%\..\Default UserSET CURUSER=%USERPROFILE%USERPROFILE is a environmental variable present on all current versions of Windows. By referencing your directories this way you eliminate compatability problems in the future. For example, your script wouldn't work on my setup because I change the default profiles location in the winnt.sif (unattend.txt) file:[GuiUnattended]ProfilesDir="%systemroot%\Profiles"This will make your code much more portable and it will work on difrferent languages too.Thus instead of:DEL "c:\Documents and Settings\All Users\Start menu\Set Program Access and Defaults.lnk"You would use:DEL "%ALLUSER%\Start menu\Set Program Access and Defaults.lnk"
pdmcmahon Posted September 9, 2004 Author Posted September 9, 2004 I have worked with variables before; but honestly, I have it working pretty **** good right now and I don't want to risk it by screwing something up
RedVyper Posted September 10, 2004 Posted September 10, 2004 Great Batch file. Similar to mine except I use the inf aproach actually I use a combination of both. I was wondering what is ALT+TAB Enhancer sounds like something that could be usefull maybe i need to add it
RyanVM Posted September 10, 2004 Posted September 10, 2004 You should learn how to use administrative install points so that you don't have to install patches for programs after installing them (such as .NET SP1, Diskeeper 478, etc).
edg21 Posted September 10, 2004 Posted September 10, 2004 This is what I use.... it reads the installation commands for all my stuff from text files & then generates an installation script.%APP_DIR% = c:\install\apps%PACK_SCR% = commands.txt%INSTALL_SCR% = c:\install.cmdfor /d %%i in (%APP_DIR%\*.*) do type "%%i\%PACK_SCR%" >> %INSTALL_SCR%Just put a commands.txt in the same directory as your setup files & edit it to contain the silent installation commands. (NOTE: the first line of commands.txt must be empty.)Example commands.txt:ECHO.ECHO Installing Winrar v3.30 ...start /wait %APP_DIR%\winrar330\winrar330.exe /sREGEDIT /S %APP_DIR%\winrar330\cascade.reg
battleangel3222 Posted September 10, 2004 Posted September 10, 2004 I would convert to RunOnceEX.....soooo much cooler looking If your interested, heres a link, its very similar to batch file commands, except it all looks nicer, see link below:http://unattended.msfn.org/xp/runonceex.htm
maxXPsoft Posted September 10, 2004 Posted September 10, 2004 pdmcmahonyour stuffAny Questions, ask an Admin
pdmcmahon Posted September 10, 2004 Author Posted September 10, 2004 Yeah, I could probably use commands, but it makes it so much easier to maintain and update if it is all contained in one batch. I played with RunOnce and the RunOnce creator tool, but it requires additional batches to run my cleanups. One batch file, plain and simple, is my preferred method. This way, I don't have to justify adding a third video card and monitor on my development box just so that I can view all the open windows Thanks to everyone for the input and suggestions.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now