How to remove all $NTUninstall......$ dirs?

R

RD_BTW_EARS

Hi!

I can't figure out how to remove all $NTUninstall....$
directories with all files and sub-directories using ie RD
command with wildcard.
There are up to 30 of those due to SUS Server running ½
year and I would like to make a simple batch file run upon
logon to save some space on those small HDD's.
No high-tech requirements on the batch file - I'll run
it "manually" when I consider needed ;P

Thanks
RD_BTW_EARS
 
R

Ritchie

I can't figure out how to remove all $NTUninstall....$
directories with all files and sub-directories using ie RD

This worked for me:-

rd /s /q $ntservicepackuninstall$

You might also want to delete this registry key:-

HKEY_LOCAL_MACHINE\
SOFTWARE\
Microsoft\
Windows\
CurrentVersion\
Uninstall\
Windows 2000 Service Pack
 
R

RD_BTW_EARS

Hi Ritchie - and thanks for your answer!

Your solution removes *only* SP Uninstall directory.
That's OK. But what about the 29 (more or less) other
Uninstall directories created by the critical security
patches?
Still looking for wildcard option for those
$NTUninstall......$ dirs!

Cheers
RD_BTW_EARS

PS Good point about the registery keys....
 
R

Ritchie

RD_BTW_EARS said:
Still looking for wildcard option for those
$NTUninstall......$ dirs!

How about:-

for /f "delims=" %%a in ('dir/ad/b %systemroot%\$NtUninstall*') do (
rd /s /q "%%a"
)
 
R

RD_BTW_EARS

Hi Ritchie!

// I'm back again, just had a 2½ hours nap - long days
makes you do funny things :))

THANKS! This does the job. Perfect.

Have a nice day - you made my day shine!
RD_BTW_EARS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top