Hi,
If you're using MSI's you can use "msiexec" to install/uninstall them.
As for friendly ircnets to ask windows questions; I don't know of any, could try efnet/etc to see if you get anywhere.
I'm just about to set foot into the wonderful world of converting installer exe's into silently installable msi's (anyone got any recommendations? Is there any good free software to do this or if not whats the best shareware app to do this/ cheap commercial app) but before that I want to know if or how I can remove apps under winxp pro sp3 from the command line? I know you can run add/remove programs via the appwiz.cpl command but can this same command be used to remove apps from the command line or a batch file? This of course also begs the question on how do I find the right string to use for removing an installed program? Of course, I would like to make the app removal process silent.
My other burning winadmin question is- does anyone know of a good, friendly irc channel for windows server/admin help?
Thanks!
Dan
Last edited by danboid; 17-10-2008 at 07:38 PM.
Hi,
If you're using MSI's you can use "msiexec" to install/uninstall them.
As for friendly ircnets to ask windows questions; I don't know of any, could try efnet/etc to see if you get anywhere.
Depends entirely on the application. MSIs you can use MSIExec with right switch, other wise it's best to have a dig about in the program directory for the uninstall program, with a bit of luck it'll run with a /s switch.
I use Advanced Installer and WininstallLE to make MSIs. I also use Wise Install Taylor to customise MSIs (it's not very powerful, but it is very easy).
By asking multiple questions in what was only originally intended to be just one, I ended up obscuring my question- sorry.
What I meant to ask is, is it possible to uninstall apps via a command line (appwiz.cpl?) that have been installed via a standard setup.exe method and are available to uninstall from the Add/Remove programs list but don't have any UnInstall tool?
I haven't installed ANYTHING via an msi yet- I was hoping I wouldn't have to manually uninstall apps installed the 'normal' way.
You could use a VBS to uninstall most current software as it is based on MSI technology http://www.microsoft.com/technet/scr....mspx?mfr=true
Some older software provides a link in the start menu to uninstall it which may be able to be run in silent mode from the command line. You may also be able to run the original installers in silent mode with an uninstall command switch.
danboid (18-10-2008)
Thanks for that link Synack- it is pretty much exactly what I was wanting but I've been unable to get it to work. Have you successfully used that script to remove anything?
The 'List all installed software' script on that page works fine, so I ran that to double check I was using the right string name for the app I wanted to uninstall. So far I've tried uninstalling both 7zip and VLC but in both cases nothing happened- no errors but the apps remain listed under Add/Remove programs.
My knowledge of vbs scripting goes no further than how to run one so I'm probably doing it wrong as there are no instructions that accompany the script so I just guessed that what you had to do was replace 'Personnel database' in the script with the name of the app you wanted to install before running it as administrator, like so:
--------------------
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSoftware = objWMIService.ExecQuery _
("Select * from Win32_Product Where Name = 'VideoLAN VLC media player 0.8.6d'")
For Each objSoftware in colSoftware
objSoftware.Uninstall()
Next
-------------------------
Maybe it only works with specific installers?
Thanks!
Dan
After much searching I found a vbs script for just this purpose that really seems to work, the Magic Uninstall VBS script:
Magic Uninstall VBS - Altirigos
Note that theres a small typo in it - you need to delete the extra space between the two l's in the line:
Const KeyPath = "Software\Microsoft\Windows\CurrentVersion\Uni nsta ll"
for it to work.
I have successfully uninstalled 7-zip from the command line using this script and the command:
cscript scriptname.vbs /Program:"7-Zip 4.57" /Options:"/S"
The /S option coaxed it into uninstalling silently but that was just a lucky (but 'educated') guess, VLC and musescore won't uninstall with a similar command.
How do I find out the correct switches required to silently uninstall any given, non-msi installed program such as VLC?
Looks like I'll be trying to stick to MSI installs from here on in!
SYNACK (18-10-2008)
Your welvome Dan, I have managed to use this to uninstall stuff in batches when we get one off laptops that are packed with 'helpful' software from the manufacturers but this method only works with installs that used the Windows installer service to do the install. This usually works well as most modern software does end up using this service by compressing an MSI into an exe. Unfourtunatly older software and a lot of the open source stuff still don't take advantage of this method and so that script is ineffective. The advantages to that way of doing it are that you can easily perform it remotely from a different machine.
That script that you found looks good and grabs the nessisary uninstall command line out of the registery which will be able to uininstall a much wider variety of stuff. Good find
In answer to your question it looks like VLC uses the NSIS installer system which should support the silent switch but this switch does have to ne implemented by the original programmers, thie site below provides the most popular command switches for installer types and recommends fileing a bug report with the developers if it does not work silently:
http://unattended.sourceforge.net/installers.php
This page also provides a little extra information:
http://www.appdeploy.com/packages/detail.asp?id=303
Last edited by SYNACK; 18-10-2008 at 06:29 PM.
danboid (18-10-2008)
Thanks for those links SYNACK!
I've read the unattended docs before just not in that much detail. What they along with your posting woke me up to the fact that lots of programs (such as VLC, 7-zip and musescore) have a uninstall.exe in their Program Files folder which, along with the /s switch or whatever, make command line uninstalls easy. That appdeploy site looks like a very handy resource for this stuff.
I actually only picked those apps at random as they were installed on this test (virtual) machine I have here. The app I was really wanting to uninstall via commandline is the old OOo (2.4.1) to make way for shiny new 3.0 (complete with Office 2007 import btw). Unlike all those other apps, OOo 2.4.1 didn't have an uninstall.exe but this is where the magicuninstaller script came to save the day as:
cscript magicuninstall.vbs /Program:"OpenOffice.org 2.4" /Options:"/qn"
did the trick. Great script find indeed!
Appdeploy has uninstall strings for lots of programs, including OpenOffice. Another good resource is the MSFN Application Installs forum. PackageDeploy.com is another site I found recently, it's small but has a forum with lots of MSI information I hadn't seen elsewhere.
There are currently 1 users browsing this thread. (0 members and 1 guests)