Solved

Delete $NTUninstall files using a DOS command prompt.

Posted on 2010-09-09
4
1,766 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 175 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 75 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 175 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

by Batuhan Cetin In this article I will be guiding through the process of removing a failed DC metadata from Active Directory (hereafter, AD) using the ntdsutil tool in a Windows Server 2003 environment. These steps are not necessary in a Win…
This may not be a text book method to resolve VSS backup issues but it seemed to have worked on few of the Windows 2003 servers we had issues while performing a Volume Shadow Copy backup. If you have issues while performing a shadow copy backup usin…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

724 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