Simple Way to Uninstall a WinForms App?

I've successfully built a WinForms app. It's installed via its MSI file. Among other things, it creates a shortcut to the application in the Start->Programs menu. I'm thinking there must be a simple way to add another shortcut there that would uninstall the app.

I know how to install the shortcut but I don't know what it should execute. Something tells me that there's something in the Windows setup system that I could likely call with a couple of parameters but my extensive searching has not revealed anything.

Any ideas

Robert W.
Vancouver, BC



Answer this question

Simple Way to Uninstall a WinForms App?

  • Jose J. Amador

    When i was creating msi for my VS 2003 solution i find a way of puting shortcut that will uninstall my app. It was as was described using msiexec /uninstall. But i didn't like it and it cause me troubles. Also then i read somewhere that it's not recomended that you have such shortcut, so i removed it. I can see that this recomendation is almost practice, and you will hardly see uninstall shortcut for .NET application. I looked at my computer now and see that none of Microsoft products have unistall options. Maybe that was a recomendation from Microsoft.

  • Samsudeen B

    boban is correct - the Windows logo program (which is a good "best practices" guide) says

    · Do not place shortcuts to remove the application in the Start menu. It is not needed because your application’s uninstaller is in the Add or Remove Programs Control Panel item.



  • wleizero

    PhilWilson wrote:

    boban is correct - the Windows logo program (which is a good "best practices" guide) says

    · Do not place shortcuts to remove the application in the Start menu. It is not needed because your application’s uninstaller is in the Add or Remove Programs Control Panel item.

    Exactly Right! I have read the exact phrase in some document may be from Microsft Guidelines. Its not a standard/good practise but many big companies follow it in many famous software.



  • not_a_programmer

    Hi there,

    The link/shortcut could execute a "msiexec.exe /uninstall Product.msi"
    Alternates:
    /x for /uninstall
    The ProductCode (The GUID) instead of the msi-file.

    Run msiexec.exe from a cmd shell without any arguments, and it will
    show you a help dialog.

    Regards,

    Lars Wilhelmsen
    http://www.sral.org/

  • rwbogosian

    It's funny, when I searched Google I couldn't find anything relevant but then when I searched CodeProject directly I found what I think you were referring to: http://www.codeproject.com/useritems/DeployUninstall.asp

    Though that code is in VB I took what it from I needed and easily created an Uninstall option.

    I do have another related question for someone though. After installing my app, I removed the MSI Setup file. Then when I clicked on the Uninstall shortcut a dialog box came up that looked remarkably similar to the Setup dialog box. It had the same formatting and even my app's icon. I'm curious to know where this info is stored, considering that the MSI file has now been removed.

    Robert W.


  • Cyber_Wolf

    I once saw an article on www.codeproject.com so better try it there.

    Best Regards,



  • Simple Way to Uninstall a WinForms App?