Link to home
Start Free TrialLog in
Avatar of patelajk
patelajk

asked on

Disconnect Network Drive/ Unistall Software Batch File

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
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

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).
ASKER CERTIFIED SOLUTION
Avatar of zivko
zivko

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial