Jump to content

Compare your batch file


Recommended Posts

I'm new to this but am proud of my batch file that runs with no errors. I know there are better one's out there so post'em!.

Comodo and Kremlin are Autoit's.

CLS

@echo off

COLOR b0

title Windows XP SP2 - Unattended Install

echo Hello! Welcome to the final step of the installation process. Software needed to make Windows XP more secure and enjoyable will be installed now. Customized settings will also be added. Your computer will reboot when the process is complete.

echo.

echo Please wait...

echo.

echo.

echo.

echo Installing Comodo Firewall v2.4

start /wait %systemdrive%\Install\Comodo\Comodo_Firewall.exe

echo.

echo Installing .NET Framework v1.1

start /wait %systemdrive%\Install\Netframework1.1\dotnetfx.exe /q:a /c:"install.exe /q"

echo.

echo Installing .NET Framework v1.1 SP1

start /wait %systemdrive%\Install\Netframework1.1\NDP1.1sp1-KB867460-X86.exe /Q

echo.

echo Installing .NET Framework v1.1 SP1 Security Update

start /wait %systemdrive%\Install\Netframework1.1\NDP1.1sp1-KB886903-X86.exe /Q

echo.

echo Installing .NET Framework v2.0

start /wait %systemdrive%\Install\Netframework2.0\dotnetfx.exe /q:a /c:"install.exe /q"

echo.

echo Installing .NET Framework v2.0 Security Update

start /wait %systemdrive%\Install\Netframework2.0\NDP20-KB917283-X86.exe /Q

echo.

echo Installing .NET Framework v2.0 Security Update

start /wait %systemdrive%\Install\Netframework2.0\NDP20-KB922770-X86.exe /Q

echo.

echo Installing DirectX 9.0c

start /wait %systemdrive%\Install\DirectX9.0c\DXSETUP.exe /silent

echo.

echo Installing UPH Clean service

start /wait %systemdrive%\Install\Uphclean\UPHClean-Setup.msi /qn

echo.

echo Installing Mozilla Firefox v1.0

start /wait %systemdrive%\Install\Firefox\setup.exe -ms -ira

echo.

echo Installing Sun Java v6 beta2

start /wait %systemdrive%\Install\SunJava\jre-6-beta2-windows-i586.exe /s /v"/qn ADLOCAL=ALL IEXPLORER=1 MOZILLA=1 REBOOT=Suppress JAVAUPDATE=0 WEBSTARTICON=0"

echo.

echo Installing Adobe Reader 6

start /wait %systemdrive%\Install\AdobeReader6\AdbeRdr60_enu_full.exe -p"-s /v\"/qn\""

echo.

echo Installing Adobe Flash Player 9

start /wait %systemdrive%\Install\Flash9\install_flash_player_active_x.msi /qn

echo.

echo Installing Ad-Aware

start /wait %systemdrive%\Install\Adaware\aawsepersonal.exe /qn /norestart

echo.

echo Installing Spybot Search and Destroy v1.4

start /wait %systemdrive%\Install\Spybot\spybotsd14.exe /VERYSILENT /NORESTART /SP-

echo.

echo Installing WinRAR ver. 330

start /wait %systemdrive%\Install\WinRAR\wrar330.exe /s

echo.

echo Installing Raxco Perfect Disk 8

start /wait %systemdrive%\Install\Pd\PerfectDisk.msi /qn /norestart

echo.

echo Installing Autoit ver. 3.2.2.0

start /wait %systemdrive%\Install\Autoit\autoit-v3.2.2.0-setup.exe /S

echo.

echo Installing Jetico BCWipe ver 3.0

start /wait %systemdrive%\Install\BCWipe\Setup.exe -S -A

echo.

echo Installing NOD32 Antivirus

start /wait %systemdrive%\Install\NOD32\setup.exe /silentmode

echo.

echo Installing NOD32 Registry Information

regedit /S %systemdrive%\Install\Reg\Esetcommon.reg

echo Installing Kremlin ver 2.21

start /wait %systemdrive%\Install\Krem\Kremlin.exe

nircmd.exe killprocess "%systemdrive%\Program Files\Mach5 Software\Kremlin\Kremlin Sentry.exe"

del /Q "%systemdrive%\Documents and Settings\Owner\Start Menu\Programs\Startup\Kremlin Sentry.LNK"

del /Q "%systemdrive%\Documents and Settings\Owner\Start Menu\Programs\Startup\Kremlin Sentry.LNK.disabled"

regedit /S %systemdrive%\Install\Reg\krem.reg

nircmd.exe regdelkey "HKEY_CURRENT_USER\Software\Mach5 Software\Kremlin\Sentry"

del /Q "%systemdrive%\Program Files\Mach5 Software\Kremlin\Kremlin Sentry.exe"

del /Q "%systemdrive%\Documents and Settings\Owner\Desktop\Kremlin Encrypt.lnk"

del /Q "%systemdrive%\Documents and Settings\Owner\Desktop\Kremlin Secure Recycle Bin.lnk"

echo.

echo Installing Custom Registry Settings

regedit /S %systemdrive%\Install\Reg\hkcuexplr.reg

regedit /S %systemdrive%\Install\Reg\nvidcpl.reg

regedit /S %systemdrive%\Install\Reg\mouse.reg

regedit /S %systemdrive%\Install\Reg\memman.reg

regedit /S %systemdrive%\Install\Reg\bags.reg

regedit /S %systemdrive%\Install\Reg\cmdpr.reg

echo.

echo Installing Shortcuts

nircmd.exe shortcut "%systemdrive%\windows\notepad.exe" "~$folder.desktop$" "Notepad"

nircmd.exe shortcut "%systemdrive%\Program Files\Outlook Express\msimn.exe" "~$folder.desktop$" "Outlook"

nircmd.exe shortcut "%systemdrive%\WINDOWS\system32\regedt32.exe" "~$folder.desktop$" "Regedit"

nircmd.exe shortcut "%systemdrive%\Program Files\Jetico\BCWipe\BCWipeTM.exe" "~$folder.desktop$" "BCWipe"

echo.

echo Finished! Please update your anti-virus and malware programs upon reboot!

echo.

echo Windows XP will reboot in 30 seconds...

echo.

start %systemdrive%\Install\Reboot\secretsauce -r -t 30 -c "System Rebooting..."

Link to comment
Share on other sites


I run onc cmd file for RunOnce that calls others during the setup.

The runonce is

cmdow @ /HID
@echo off

for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist %%i:\phkcd.txt set CDROM=%%i:
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%\a2 /VE /D "Finishing Setup ..." /f
REG ADD %KEY%\a2 /V 1 /D "prepare.cmd" /f
REG ADD %KEY%\a2 /V 2 /D "regedit /s %CDROM%\$OEM$\tweaks.reg" /f
REG ADD %KEY%\a2 /V 3 /D "themes.cmd" /f
REG ADD %KEY%\a2 /V 4 /D "shortcuts.cmd" /f

REM Tweaks go here.
REM Disbale Zip Folders
regsvr32 /u /s zipfldr.dll


rem Software goes here
REG ADD %KEY%\a3 /VE /D "AVG Anti Virus Free" /f
REG ADD %KEY%\a3 /V 1 /D "%CDROM%\software\avg.exe /HIDE /DONT_START_APPS /NO_WELCOME /NO_AVGW_STARTUP

REG ADD %KEY%\z099 /VE /D "Cleaning Up and Rebooting" /f
REG ADD %KEY%\z099 /V 1 /D "cleanup.cmd" /f

shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minutes.\n\n This will allow for all software to install..."

the other files are

prepare.cmd

themes.cmd

shortcuts.cmd

cleanup.cmd

Edited by phkninja
Link to comment
Share on other sites

Oops! I think your "cleanup.cmd" just ran on my PC cumminbk. Gotta be more careful what I click on.

Just curious, but what exactly do you "clean" when you run a clean-up batch? I thought windows setup automatically removes all the temps and garbage when its done.

Link to comment
Share on other sites

it removes any install directories i create and also removes the prepare, themes and shortcuts command files from system32. maybe i should also add a runonce command to remove the cleanup file aftre the next boot :)

The install directory is not used any more because I run the setups from CD, but the cleanup hasnt been change since my first build *lol*

Edited by phkninja
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...