?
Solved

Delete $NTUninstall files using a DOS command prompt.

Posted on 2010-09-09
4
Medium Priority
?
1,781 Views
Last Modified: 2012-05-10
I have developed a simple batch file generator using VisualStudio C#.NET that installs multiple Microsoft patch upgrades in a single .bat file.  I'd like to add code to the .bat file that wil delete the associated $NTUninstallKB999999 files as well.  When I view the directory where the $NTUninstall files are located using the CMD/DOS window, I do not see them, nor can I build a DOS statement that will delete them.  Any suggestions?  Is there a command string that I can write in C# that will tell Windows to delete these files?
0
Comment
Question by:rdbrunet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 96

Accepted Solution

by:
Lee W, MVP earned 700 total points
ID: 33637857
The folders are hidden by default.

ATTRIB $NTUninstall..... -R -S -H

should remove all attributes protecting them.

Then use the RD /S /Q $NTUninstall... command - but be careful.  if done at the wrong spot you could wipe out windows.
0
 
LVL 1

Assisted Solution

by:chadcku
chadcku earned 300 total points
ID: 33637878
A dos statement of "del c:\windows\$NtUninstallKB982214$ /q" Should work. If you wish to see the diretories, then "dir c:\windows\$Nt*.* /ah" should let you see them.
0
 
LVL 96

Assisted Solution

by:Lee W, MVP
Lee W, MVP earned 700 total points
ID: 33637991
The DEL command will not delete the directory or the subdirectories of the folders that have subfolders.

RD /S /Q should.

(It MAY be unnecessary to unhide the folders with ATTRIB. I'd try the RD command with the correct folder name first).
0
 

Author Closing Comment

by:rdbrunet
ID: 33638698
Great solution.  Thanks for the leg up.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
Learn about cloud computing and its benefits for small business owners.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question