abarax66 Posted January 17, 2006 Posted January 17, 2006 I was curious if there's a way to delete folders on the hard disk following the installation AFTER rebooting the system. Some of my apps require a restart otherwise I get an error when i try to delete the C:\install folder after the first Windows logon. Here's my batch file...CLS@echo offTITLE Windows XP SP2 - Gary's Unattended InstallationECHO.ECHO Over the next few minutes you will see automated installations ECHO of various sofware applications, windows updates, and registryECHO adjustments. Enjoy the ride!ECHO From Gary...with loveECHOECHO Installing Nero Burning ROM 6.6.018ECHO Please wait...start /wait %systemdrive%\install\Applications\Nero\Nero66018.exe /silent /noreboot /no_ui /sn=itnvv2e28qav0rphm7uwpjrjpk0 /write_snECHOECHO Installing Kerio Personal Firewall 4.2.2ECHO Please wait...start /wait %systemdrive%\install\Applications\Kerio\KPF422.exe /s /v" /qn REBOOT=Suppress"ECHOECHO Installing Outlook Express Backup 6.5ECHO Please wait...start /wait %systemdrive%\install\Applications\Outlook\OEB.exe /VERYSILENT /SP-ECHOECHO Installing PhotoStory 3ECHO Please wait...start /wait %systemdrive%\install\Applications\PhotoStory3\PhotoStory3.exeECHOECHO Installing QuickTime Alternative Alternative 1.68ECHO Please wait...start /wait %systemdrive%\install\Applications\QuickTime\QTALT168.exe /VERYSILENT /SP-ECHOECHO Installing Real Alternative 1.46ECHO Please wait...start /wait %systemdrive%\install\Applications\Real\REALALT146.exe /VERYSILENT /SP-ECHOECHO Installing Kazaa Lite K++ 2.43ECHO Please wait...start /wait %systemdrive%\install\Applications\KazaaLite\klite243.exe /silentECHOECHO Installing Tune Up Utilities 2006ECHO Please wait...start /wait %systemdrive%\install\Applications\TuneUp\TU2006.exe /qECHOECHO Installing AnyDVD 5.8.2.1ECHO Please wait...start /wait %systemdrive%\install\Applications\AnyDVD\AnyDVD.exe /S /NOREBOOTECHOECHO Installing AutoITECHO Please wait...start /wait %systemdrive%\install\Applications\AutoIT\AutoIT.exe /S ECHOECHO Installing VirtualDubECHO Please wait...start /wait %systemdrive%\install\Applications\VirtualDub\VirtualDub.msi /qnECHOECHO Installing nLite 1.0 RC5ECHO Please wait...start /wait %systemdrive%\install\Applications\nLite\nLite.exe /VERYSILENT /SP-cls@echo offECHO.ECHO Installing Webshots Desktop 2.0start /wait %systemdrive%\install\Applications\Webshots\webshots.jsdel "%UserProfile%\Desktop\Webshots Desktop.lnk"REGEDIT /S %systemdrive%\install\Applications\Webshots\webshots.regECHO.ECHOECHO Installing Office 2003 ProfessionalECHO Please wait...start /wait %systemdrive%\install\Applications\Office2003\setup.exe TRANSFORMS=Unattended.MST /qb-ECHOECHO Installing FrontPage 2003ECHO Please wait...start /wait %systemdrive%\install\Applications\FrontPage2003\setup.exe TRANSFORMS=Unattended.MST /qb-ECHO.ECHO Performing System CleanupDEL "%systemdrive%\install"DEL "%systemdrive%\msasw"DEL "%systemdrive%\Drivers"RD /S /Q "%AllUsersProfile%\My Documents\My Music\Sample Playlists"RD /S /Q "%AllUsersProfile%\My Documents\My Pictures\Sample Pictures"ECHO Done!EXITAny assistance would be greatly be appreciated.
jondercik Posted January 17, 2006 Posted January 17, 2006 DEL "%systemdrive%\install"DEL "%systemdrive%\msasw"DEL "%systemdrive%\Drivers"should use the rd command
Doc Symbiosis Posted January 17, 2006 Posted January 17, 2006 To delete a folder after restart, run a batch, called e.g. Runonceex.cmd containing:@echo offsetlocal enableextensionsSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Running last tasks" /fREG ADD %KEY%\010 /VE /D "Deleting the install-directory" /fREG ADD %KEY%\010 /V 1 /D "%COMSPEC% /C rmdir %SYSTEMDRIVE%\Install /s /Q" /fendlocalAfter a restart, this deletes the folder %SYSTEMDRIVE%\Install after the login.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now