a06lp Posted October 18, 2004 Posted October 18, 2004 here's the dealio:my cleanup.cmd file does almost everything it's supposed to.for some reason, the folders "c:\install\wpi282h", and "c:\install\applications\pdvd" won't delete. is there some way to force it?the apps in there are WPI, and POWERDVD5.both finished installing...probably some kind of background app running?here's my code:CLS@echo offTITLE Windows XP SP2 - CleanupECHO.shutdown.exe -r -f -t 60 -m "Windows XP will now restart in 1 minute..."ECHO Creating IMPORTANT Text File on Desktop (for Changing Logon Password and Computer Name)... XCOPY "%systemdrive%\Install\IMPORTANT.txt" "%UserProfile%\Desktop\" /YECHO Turning On Network Connection Icon(s)... start /wait %systemdrive%\install\Network\NetworkIcon.vbsECHO Deleting Default Users of XP (Remote User, Help User, .NET User)... start /wait net user helpassistant /delete start /wait net user SUPPORT_388945a0 /delete start /wait net user ASPNET /deleteECHO Moving & Deleting Installation Shortcuts... //Create Outlook Express Shortcut in Quick Launch XCOPY "%systemdrive%\Install\Tweaks\Outlook Express.lnk" "%UserProfile%\Application Data\Microsoft\Internet Explorer\Quick Launch\" /Y //Standard Crap RD /S /Q "%AllUsersProfile%\Start Menu\Programs\PrintMe Internet Printing" RD /S /Q "%AllUsersProfile%\Start Menu\Programs\Java Web Start" DEL "%AllUsersProfile%\Start Menu\Programs\Windows Movie Maker.lnk" DEL "%UserProfile%\Start Menu\Programs\Remote Assistance.lnk" DEL "%systemdrive%\Documents and Settings\All Users\Start Menu\Set Program Access and Defaults.lnk" DEL "%systemdrive%\Documents and Settings\All Users\Start Menu\Windows Catalog.lnk" //Ad-Aware DEL "%UserProfile%\Application Data\Microsoft\Internet Explorer\Quick Launch\Ad-Aware SE Personal.lnk" //Adobe Reader 6.0 DEL "%AllUsersProfile%\Desktop\Adobe Reader 6.0.lnk" //Adobe Gamma Loader DEL "%AllUsersProfile%\Start Menu\Programs\Startup\Adobe Gamma Loader.lnk" //AIM DEL "%AllUsersProfile%\Desktop\Free AOL & Unlimited Internet.lnk" DEL "%AllUsersProfile%\Start Menu\Free AOL & Unlimited Internet.lnk" DEL "%AllUsersProfile%\Desktop\AOL Instant Messenger.lnk" DEL "%UserProfile%\Application Data\Microsoft\Internet Explorer\Quick Launch\AOL Instant Messenger.lnk" //Daemon Tools MOVE "%AllUsersProfile%\Desktop\DAEMON Tools.lnk" "%UserProfile%\Start Menu\" //FlashFXP DEL "%UserProfile%\Application Data\Microsoft\Internet Explorer\Quick Launch\FlashFXP.lnk" DEL "%UserProfile%\Desktop\FlashFXP.lnk" //FlashGet DEL "%UserProfile%\Desktop\FlashGet.lnk" //Kazaa Lite DEL "%UserProfile%\Application Data\Microsoft\Internet Explorer\Quick Launch\Kazaa Lite K++.lnk" //Nero 6.6 DEL "%UserProfile%\Application Data\Microsoft\Internet Explorer\Quick Launch\Nero StartSmart.lnk" DEL "%AllUsersProfile%\Desktop\Nero StartSmart.lnk" //Spybot DEL "%UserProfile%\Application Data\Microsoft\Internet Explorer\Quick Launch\Spybot - Search & Destroy.lnk" //TuneUp 2004 RD /S /Q "%UserProfile%\Start Menu\Programs\TuneUp Utilities 2004" DEL "%UserProfile%\Desktop\1-Click Maintenance.lnk" //Winamp DEL "%UserProfile%\Application Data\Microsoft\Internet Explorer\Quick Launch\Winamp.lnk" DEL "%UserProfile%\Desktop\Winamp.lnk" //WinRAR DEL "%UserProfile%\Start Menu\winrar.lnk"ECHO Deleting Sample Music, Playlists, and Pictures... RD /S /Q "%AllUsersProfile%\Documents\My Music\Sample Music\" RD /S /Q "%AllUsersProfile%\Documents\My Music\Sample Playlists\" RD /S /Q "%AllUsersProfile%\Documents\My Pictures\Sample Pictures\"ECHO Deleting Preset Internet Explorer Favorites... RD /S /Q "%UserProfile%\Favorites\"ECHO Deleting Temp Installation Files... RD /S /Q %systemdrive%\Drivers RD /S /Q %systemdrive%\Install RD /S /Q "%systemroot%\Cache\Adobe Reader 6\"EXIT
a06lp Posted October 18, 2004 Author Posted October 18, 2004 PS - in case it wasn't clear, the line of:RD /S /Q %systemdrive%\Installis supposed to delete both of the above mentioned directories and subfiles (along with other directories, which DO successfully delete), since both are in %systemdrive%\install
MCT Posted October 18, 2004 Posted October 18, 2004 where is your cleanup file? in %systemdrive%\install ?maybe thats why its not deleting cuz its in use
a06lp Posted October 18, 2004 Author Posted October 18, 2004 yes. but isnt the point of a cleanup to be able to delete everything, EVEN ITSELF?and how does that have anything to do with the other one: powerdvd?
Jito463 Posted October 18, 2004 Posted October 18, 2004 I don't believe RD will delete empty directories. What I did was copy deltree to my System32 directory and use it to remove my copied install directories like so:DEL /Q "%AllUsersProfile%\Desktop\Sysprep.bat"DEL /Q "%AllUsersProfile%\Desktop\bit.bat"DEL /Q "%AllUsersProfile%\Desktop\CHANGEOWNERORG.EXE"DELTREE /Y "%SystemDrive%\OEM"
a06lp Posted October 18, 2004 Author Posted October 18, 2004 I don't believe RD will delete empty directories.except that it does.i use the command several times in the cleanup, and the ONLY times it doesnt work are listed above. i think it has something to do with files-in-use, but i need a way to force deletion even if in use..
Alpheratz13 Posted October 19, 2004 Posted October 19, 2004 (edited) Morning,I have me too the same probleme, the folder "Install" don't delete at all, but the folder "Drivers" are delete.Before it's works fine and now (i don't know wich reason) don't delete "Install"Here is my cleanup.cmdcmdow @ /HIDshutdown.exe -r -f -t 10 -c "Windows XP aller redémarrer dans 10 secondes..."net user aspnet /deleteRD /S /Q "%AllUsersProfile%\Start Menu\Programs\PrintMe Internet Printing"RD /S /Q "%AllUsersProfile%\Start Menu\Programs\Java Web Start"DEL "%systemroot%\*.bmp"DEL "%systemroot%\Web\Wallpaper\*.jpg"DEL "%systemroot%\system32\dllcache\*.scr"DEL "%systemroot%\system32\*.scr"DEL "%AllUsersProfile%\Start Menu\Windows Update.lnk"DEL "%AllUsersProfile%\Start Menu\Set Program Access and Defaults.lnk"DEL "%AllUsersProfile%\Start Menu\Windows Catalog.lnk"DEL "%UserProfile%\Start Menu\Programs\Windows Media Player.lnk"DEL "%AllUsersProfile%\Start Menu\Programs\Windows Movie Maker.lnk"DEL "%AllUsersProfile%\Start Menu\Programs\Adobe Reader 6.0.lnk"DEL "%UserProfile%\Desktop\Flashget.lnk"DEL "%AllUsersProfile%\Desktop\Java Web Start.lnk"DEL "%AllUsersProfile%\Desktop\Adobe Reader 6.0.lnk"DEL "%AllUsersProfile%\Desktop\Alcohol 120%.lnk"Del /y "%AppData%\Microsoft\Internet Explorer\Quick Launch\Tag&Rename.lnk"RD /S /Q "%systemroot%\Cache\Adobe Reader 6\"RD /S /Q %systemdrive%\drivers\RD /S /Q %systemdrive%\instal\EXITWhat can be wrong?ThanksIrvingEDIT. its don't work since i put the Hotfix (RyanVM's Windows XP SP2 Update Pack 1.01), is possible is came from there error of deleter "Install"??@a06lp : Did you also put the hotfix?I do a test without the hotfix looks if will works or is the same.I let you know. Edited October 19, 2004 by Alpheratz13
MHz Posted October 19, 2004 Posted October 19, 2004 Put shutdown.exe at the end of the command script may help.10 seconds will not be enough?@Alpheratz13Do you spell install, as instal or install ?@a06lpDouble forward slash is not a comment in command script. Use a semi-colon instead. Try typing // into a command box and see what you get.
evilvoice Posted October 19, 2004 Posted October 19, 2004 to comment, either use echo (if you want it to display something) or REM (if youre just using it so if you edit the file, youll know what is supposed to go there)
a06lp Posted October 19, 2004 Author Posted October 19, 2004 @Alpheratz13:I did put the hotfix, but I don't think my cleanup was fully working before anyways...@MHz, @evilvoice:Really? I didn't know that - I'll fix it (added REM to those "//" lines). But then why would SOME of my folders inside "Install" delete, and not all?
MHz Posted October 19, 2004 Posted October 19, 2004 @a06lpYou can use ; for start of comments?Looks like it should remove those folders, but put shutdown at end of script. May make the difference.
a06lp Posted October 19, 2004 Author Posted October 19, 2004 no, cleanup finishes about the time the countdown gets to 30 seconds...i have plenty of time for it to finish, but it doesnt...
Alpheratz13 Posted October 19, 2004 Posted October 19, 2004 Evening,@MHz@Alpheratz13Do you spell install, as instal or install ?Ooooops, I don't see this error, since fews days don't works and don't seeing the error "Install" & "Instal"...aaawww , i need take a pause for fews days, my mind start beeing tired. I look if works now.Thanks MHz for showing the error Irving
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