Uninstalling Software via commandline


  1. Posts : 136
    Windows 7
       #1

    Uninstalling Software via commandline


    Hallo,

    Is there a propper way of uninstalling software from my Windows pc via the commandline ?
    i found something like:
    Code:
    msiexec /uninstall MSIPACKAGE.msi
    But this works only if i got the MSI-package i installed the software with.
    (It also does not work if i got a newer version MSI package of the same Software)

    So is there an other way?
    How windows does remove the software if i click in the "Program & Features Panel" to remove Programs?
      My Computer


  2. Posts : 17,322
    Win 10 Pro x64
       #2
      My Computer


  3. Posts : 136
    Windows 7
    Thread Starter
       #3

    No, as i mention in my last post i allready tried this, but u need the msi package.
    If this is not availible it doesnt help.
      My Computer


  4. Posts : 17,322
    Win 10 Pro x64
       #4

    MPREv said:
    No, as i mention in my last post i allready tried this, but u need the msi package.
    If this is not availible it doesnt help.
    Well I'm sure someone else here can help as soon as they see your post.
      My Computer


  5. Posts : 136
    Windows 7
    Thread Starter
       #5

    hmmm nobody?
    Does no body needs to uninstall software ??
      My Computer


  6. Posts : 6,285
    Windows 10 Pro X64
       #6

    Sure, we all do but we use Control Panel Programs and Features to do it.

    Why do you need to do this via Command Line?

    What are you trying to uninstall? Many times the installer for a program also places a uninstaller in the same directory, often with a U in the name some where. For instance, TightVNC puts a unins000.exe in it's installation directory.

    Also, in the registry there is a key:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall

    that lists every installed application by name. If you look at each one you can find the uninstall string. TeraCopy for example:
    Code:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\TeraCopy_is1
        Inno Setup: Setup Version    REG_SZ    5.2.3
        Inno Setup: App Path    REG_SZ    D:\TeraCopy
        InstallLocation    REG_SZ    D:\TeraCopy\
        Inno Setup: Icon Group    REG_SZ    TeraCopy
        Inno Setup: User    REG_SZ    rrkurtz
        Inno Setup: Selected Tasks    REG_SZ    desktopicon,md5,sfv
        Inno Setup: Deselected Tasks    REG_SZ
        DisplayName    REG_SZ    TeraCopy 2.12
        UninstallString    REG_SZ    "D:\TeraCopy\unins000.exe"
        QuietUninstallString    REG_SZ    "D:\TeraCopy\unins000.exe" /SILENT
        Publisher    REG_SZ    Code Sector Inc.
        URLInfoAbout    REG_SZ    http://www.teracopy.com
       HelpLink    REG_SZ    http://www.teracopy.com
       URLUpdateInfo    REG_SZ    http://www.teracopy.com
       NoModify    REG_DWORD    0x1
       NoRepair    REG_DWORD    0x1
       InstallDate    REG_SZ    20100418
      My Computer


  7. Posts : 136
    Windows 7
    Thread Starter
       #7

    Sure, we all do but we use Control Panel Programs and Features to do it.
    Why do you need to do this via Command Line?
    Remote and on more than 2 PCs its not funny to use a GUI.
    Or you can say i just want to?

    Also, in the registry there is a key:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall
    That sounds good.
    But my Uninstall sting is something like:
    MsiExec.exe /I{8DAA31EB-... .... ... -4DF8AB24714F}
    running it i can repair or remove the up.
    so i need to modify it the way to automatically remove without GUI Prompt.

    But for the Batch scrip: is there a way to filter the Reg for the 'UninstallString'
    by knowing the 'DisplayName'.
      My Computer


  8. Posts : 6,285
    Windows 10 Pro X64
       #8

    This works for me:

    reg query "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\TeraCopy_is1" | find "UninstallString"
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 07:26.
Find Us