locked
Unistall Application Through Command Line RRS feed

  • Question

  • Hi,

     

    I would like to know if its is possible to uninstall an application using command line arguements.

     

    I would basically like to uninstall an application as is done normally through Add/Remove programs, but through the command line.

     

    Is this possible?

     

    If so please provide an example.

    Thursday, March 29, 2007 11:09 AM

Answers

  • Mo1234,

     

    Please try the following steps:

     

    1. In your Setup project's directory, create a new Uninstall.bat file.

     

    2. In your Setup project, copy the ProductCode property (a value like [12345678-1234-1234-1234-123412341234]).

     

    3. Edit Uninstall.bat so that it has one line containing the following, where ProductCode is the value you copied in step 2:

     

    4. Msiexec /x ProductCode

     

    5. Add Uninstall.bat to your Setup project's application folder.

     

    6. Right-click Uninstall.bat and click Create Shortcut to create a shortcut.

     

    7. Put the shortcut in the appropriate Start menu folder in the Setup project.

     

    8. Rename the shortcut; for example, "Uninstall Application Name."

    Wednesday, April 4, 2007 3:41 AM

All replies

  • Mo1234,

     

    Please try the following steps:

     

    1. In your Setup project's directory, create a new Uninstall.bat file.

     

    2. In your Setup project, copy the ProductCode property (a value like [12345678-1234-1234-1234-123412341234]).

     

    3. Edit Uninstall.bat so that it has one line containing the following, where ProductCode is the value you copied in step 2:

     

    4. Msiexec /x ProductCode

     

    5. Add Uninstall.bat to your Setup project's application folder.

     

    6. Right-click Uninstall.bat and click Create Shortcut to create a shortcut.

     

    7. Put the shortcut in the appropriate Start menu folder in the Setup project.

     

    8. Rename the shortcut; for example, "Uninstall Application Name."

    Wednesday, April 4, 2007 3:41 AM
  • Mo1234,

     

    If you application is a .NET deployment project, I recommend you to read the following link:

     

    Add an uninstall start menu item to your .NET deployment project

     

    http://www.codeproject.com/dotnet/DeployUninstall.asp?df=100&forumid=209357&exp=0&select=1207985

     

     

    Wednesday, April 4, 2007 5:11 AM
  • Hi Bruno,

    This URL,
    http://www.codeproject.com/dotnet/DeployUninstall.asp?df=100&forumid=209357&exp=0&select=1207985
    it has changed, 
    The one  followed is valid.
    http://www.codeproject.com/install/DeployUninstall.asp?df=100&forumid=209357&exp=0&select=1207985


    Monday, October 15, 2007 8:34 AM