BloodStalker Posted September 8, 2004 Share Posted September 8, 2004 Hi there, I am having a problem with my Cleanup.cmd file. I have this file setup on a cd so that it is not installed onto the hard drive during runonceex.cmd The registry part of this file works but the del command isn't deleting the c:\install folder I have posted my cleanup.cmd file here, the if statements are so that it can be run from my cdcmdow @ /HID@echo offIF EXIST D:\CD.txt set CDROM=D:IF EXIST E:\CD.txt set CDROM=E:IF EXIST F:\CD.txt set CDROM=F:IF EXIST G:\CD.txt set CDROM=G:IF EXIST H:\CD.txt set CDROM=H:IF EXIST I:\CD.txt set CDROM=I:IF EXIST J:\CD.txt set CDROM=J:shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute..."net user aspnet /deleteDEL "%systemdrive%\Install"Start %CDROM%\$OEM$\DeleteRegistryFiles.regNOTE: I figured out the problem, i just remembered the del command cannot delete folders that have files in them Link to comment Share on other sites More sharing options...
Astalavista Posted September 8, 2004 Share Posted September 8, 2004 snippee doo da Link to comment Share on other sites More sharing options...
Aaron Posted September 8, 2004 Share Posted September 8, 2004 why do you have this statement in your cleanup.cmd?IF EXIST D:\CD.txt set CDROM=D:IF EXIST E:\CD.txt set CDROM=E:IF EXIST F:\CD.txt set CDROM=F:IF EXIST G:\CD.txt set CDROM=G:IF EXIST H:\CD.txt set CDROM=H:IF EXIST I:\CD.txt set CDROM=I:IF EXIST J:\CD.txt set CDROM=J:Because he has %CDROM%\$OEM$\DeleteRegistryFiles.reg in his cleanup.cmd file (notice the %CDROM%)Bloodstalker, the correct way of executing the reg file is regedit /S %CDROM%\$OEM$\DeleteRegistryFiles.reg otherwise you'll get a prompt asking if you want to import the entries.DEL doesn't work on folders, use RD /S /Q %systemdrive%\install\ and this should be the very last line (even after your registry command) Link to comment Share on other sites More sharing options...
Astalavista Posted September 8, 2004 Share Posted September 8, 2004 I missed that ... i hv to get my glasses changed Link to comment Share on other sites More sharing options...
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