Jump to content

Recommended Posts

Posted

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 off
TITLE Windows XP SP2 - Cleanup

ECHO.

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\" /Y

ECHO Turning On Network Connection Icon(s)...
start /wait %systemdrive%\install\Network\NetworkIcon.vbs

ECHO 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 /delete

ECHO 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


Posted

PS - in case it wasn't clear, the line of:

RD /S /Q %systemdrive%\Install

is 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

Posted

where is your cleanup file? in %systemdrive%\install ?

maybe thats why its not deleting cuz its in use ;)

Posted

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?

Posted

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"

Posted
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..

Posted (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.cmd

cmdow @ /HID
shutdown.exe -r -f -t 10 -c "Windows XP aller redémarrer dans 10 secondes..."
net user aspnet /delete

RD /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\

EXIT

What can be wrong?

Thanks

Irving

EDIT. 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 by Alpheratz13
Posted

Put shutdown.exe at the end of the command script may help.

10 seconds will not be enough?

@Alpheratz13

Do you spell install, as instal or install ?

@a06lp

Double 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.

Posted

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)

Posted

@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?

Posted

@a06lp

You can use ; for start of comments?

Looks like it should remove those folders, but put shutdown at end of script. May make the difference.

Posted

no, cleanup finishes about the time the countdown gets to 30 seconds...

i have plenty of time for it to finish, but it doesnt...

Posted

Evening,

@MHz

@Alpheratz13

Do you spell install, as instal or install ?

Ooooops, :blushing:

I don't see this error, since fews days don't works and don't seeing the error "Install" & "Instal"...aaawww :blushing: , i need take a pause for fews days, my mind start beeing tired. :wacko:

I look if works now.

Thanks MHz for showing the error :)

Irving

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...