Solved

Disconnect Network Drive/ Unistall Software Batch File

Posted on 2007-04-10
2
723 Views
Last Modified: 2008-02-01
Hi

Trying to write batch file that will disconnect a network drive and uninstall a program. I can uninstall the softwate from "Add/Remove Programs" but how do I do this from a batch file.

For the disconnect network drive i have the script below, but it keeps on asking for a confirmation to disconnect how can i make it so it just does it automaticatlly without a confirmation and of course how do I unninstall the software

This is the script so far:

net use q: /delete /persistent:yes

Thanks
0
Comment
Question by:patelajk
2 Comments
 
LVL 95

Expert Comment

by:Lee W, MVP
Comment Utility
The uninstall software part depends entirely on the software you are trying to uninstall.  If there's no ability to script it, then you're going to have a very difficult time doing this.

As for disconnecting the network drive, that's easy.

Try:

ECHO Y|NET USE Q: /DELETE

(Using persistent here is kinda pointless).
0
 
LVL 4

Accepted Solution

by:
zivko earned 125 total points
Comment Utility
Hi,

I do it in this way...
Unmap Network drive silently, as given by Leew: ECHO Y|NET USE Q: /DELETE

To uninstall the program, you must first find the exact command line to do it.
It is available in the registry and you may need to modify it in order for the installation to become silent.

Uninstall registry keys are located here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\APP\UninstallString
APP = The application name or ID to uninstall
UninstallString = Command to uninstall the application

Regards,
Zivko
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

772 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now