Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Disconnect Network Drive/ Unistall Software Batch File

Posted on 2007-04-10
2
Medium Priority
?
735 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 96

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 375 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

704 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