Solved

Disconnect Network Drive/ Unistall Software Batch File

Posted on 2007-04-10
2
731 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
[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 Comments
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 18880993
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
ID: 18881767
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

756 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