Help - Search - Members - Calendar
Full Version: can some1 hel me make a clenaup.cmd?
MSFN Forums > Unattended Windows Discussion & Support > Application Installs

   
Google Internet Forums Unattended CD/DVD Guide
kurt476
i don't know what the temporyly folders where they are for 2k3/xp dose any budy know? but i need to cleanup up a the temp folders the the all the installation i did for unattended windows xp/2k3
rendrag
it depends on which temp folders you are referring too... if you are talking the user's temp dir, it would be (for XP)
CODE
%systemdrive%\Documents and Settings\User\Local Settings\Temp

but generally speaking, that folder should be pretty empty to start off. If you are talking about your specific folders you used during installation of your programs, you could put the following code in your cmd file
CODE
RD /S /Q %systemdrive%\setup\applications

just continue on that idea for all the folders you need to delete. Obviously anything contained in the "applications" folder in my example would be deleted

hope that helped
kurt476
yeah i'm talking about:

%systemdrive%\Documents and Settings\User\Local Settings\Temp

for XP and i think win2k3 has too how about deleting the *.tmp files to and the junk files is there a program durning the RunOnceEx.cmd to clenup the junk files that i install first then it cleanuse up after the installation applications?
rendrag
there's nothing "built in" to runonce that would automatically flush your temp directory that i'm aware of, though to be honest, i don't use runonce, so I'm not 100% sure. I would have to digress to the members that have more knowledge on that than I.

Have you found that the temp directories are filled with files during/after an install?

good luck.
kurt476
yeah they are but i need to delete all files in that temp directory
jrzycrim
rd /q /s "%systemdrive%\Documents and Settings\User\Local Settings\Temp\"

That shoud work. If there are any files in that directory that are currently in use, they will not be deleted. Otherwise, the temp directory as well as all files and subfolders will be deleted. That's fine as Windows will recreate the Temp directory at the next logon.
kurt476
@jrzycrim

this didn't work rd /q /s "%systemdrive%\Documents and Settings\User\Local Settings\Temp\" like it suppost too delete it why isn't it working ?
1chaoticadult
@kurt476
Some files might be in use by some process when you try to delete files from the temp directory.
jsolares
did you try that literally, or did you change User to the user name you want to delete the temp files of?

i have Administrator, All Users, Default User

only Default User and Administrator have a temp dir

so you might want to try

CODE
RD /Q /S "%systemdrive%\Documents and Settings\Administrator\Local Settings\Temp\"
RD /Q /S "%systemdrive%\Documents and Settings\Default User\Local Settings\Temp\"


and that's only if you're using an english xp
MHz
Or your temp dir is an environmental variable.
Such as:
CODE
Del /Q /F /S %Temp%\*.*

As others have stated, files may be in use, that may cause prompts. For unattended, if tested, and no prompts, then it should be good to burn.
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.