+ Post New Thread
Results 1 to 10 of 10
Windows Thread, remove apps via cmd, winadmin irc? in Technical; I'm just about to set foot into the wonderful world of converting installer exe's into silently installable msi's (anyone got ...
  1. #1

    Join Date
    Oct 2008
    Posts
    94
    Thank Post
    8
    Thanked 16 Times in 10 Posts
    Rep Power
    26

    remove apps via cmd, winadmin irc?

    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; 17th October 2008 at 07:38 PM.

  2. #2


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,657
    Thank Post
    350
    Thanked 789 Times in 710 Posts
    Rep Power
    344
    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.

  3. #3


    Join Date
    Jul 2007
    Location
    Rural heck
    Posts
    2,662
    Thank Post
    120
    Thanked 434 Times in 353 Posts
    Rep Power
    125
    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).

  4. #4

    Join Date
    Oct 2008
    Posts
    94
    Thank Post
    8
    Thanked 16 Times in 10 Posts
    Rep Power
    26

    uninstall apps installed via setup.exe

    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.

  5. #5

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    10,691
    Thank Post
    824
    Thanked 2,570 Times in 2,187 Posts
    Blog Entries
    9
    Rep Power
    731
    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.

  6. Thanks to SYNACK from:

    danboid (18th October 2008)

  7. #6

    Join Date
    Oct 2008
    Posts
    94
    Thank Post
    8
    Thanked 16 Times in 10 Posts
    Rep Power
    26
    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

  8. #7

    Join Date
    Oct 2008
    Posts
    94
    Thank Post
    8
    Thanked 16 Times in 10 Posts
    Rep Power
    26

    working vbs script - now for the options

    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!

  9. Thanks to danboid from:

    SYNACK (18th October 2008)

  10. #8

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    10,691
    Thank Post
    824
    Thanked 2,570 Times in 2,187 Posts
    Blog Entries
    9
    Rep Power
    731
    Quote Originally Posted by danboid View Post
    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?
    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; 18th October 2008 at 06:29 PM.

  11. Thanks to SYNACK from:

    danboid (18th October 2008)

  12. #9

    Join Date
    Oct 2008
    Posts
    94
    Thank Post
    8
    Thanked 16 Times in 10 Posts
    Rep Power
    26

    uninstall.exe

    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!

  13. #10

    Join Date
    Apr 2008
    Location
    Dublin
    Posts
    59
    Thank Post
    16
    Thanked 6 Times in 6 Posts
    Rep Power
    14
    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.

SHARE:
+ Post New Thread

Similar Threads

  1. AutoIt / cmd file
    By superfletch in forum Scripts
    Replies: 5
    Last Post: 19th August 2008, 01:41 PM
  2. cmd command
    By tabby1039 in forum Windows
    Replies: 4
    Last Post: 3rd June 2008, 10:47 AM
  3. Edugeek IRC
    By greenfieldsupport in forum General Chat
    Replies: 1
    Last Post: 20th June 2007, 10:02 AM
  4. EduGeek IRC?
    By Samson in forum General Chat
    Replies: 9
    Last Post: 14th June 2007, 09:58 AM
  5. IM/IRC
    By GrumbleDook in forum Comments and Suggestions
    Replies: 5
    Last Post: 23rd August 2005, 05:39 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •