You must Sign In to post a response.
  • Category: .NET

    How to add uninstall option during set up file creation?

    I have create set up file but i dont know how to add uninstall option in under Programs menu option and license agreement option/ can anyone know please share with me...
  • #583943
    Hi Ravindran,

    I borrowed the steps from another forum for your solution

    -> Create an Uninstall.bat file containing:
    C:\WINDOWS\system32\MsiExec.exe /I{productcode}

    (Path depends of your Windows version, check where your system32 folder is located.. you can also use %systemroot%\System32\msiexec.exe)

    (You'll find the productcode in Visual Studio.NET > Tab Properties in the setup project you've just created)

    -> Open the setup project in Visual Studio.NET if you closed it

    -> Add (right-click in Application Folder):

    · Add > Project Output > File > Uninstall.bat

    · Create New Shortcut > Application Folder > Primary Output (enter a name)

    · Create New Shortcut > Application Folder > Uninstall.bat (enter a name)

    · Add > File > add .ico files you want to use for the shortcuts

    -> Shortcuts properties > 'icon' property (use the icons you've just added)

    -> Move the shortcuts to User's Desktop/User's Programs Menu (you can also create subfolders)

    -> Build > Rebuild 'name project'

    Hope it helps.

    - Pavan Pareta

  • #584217
    Hi Ravindran,

    I borrowed the steps from another forum for your solution

    1. Create a txt file but save this file with .bat extention
    Now (right click on it and chose edit to open it) write below code in this file

    @echo off
    msiexec/x ------ {B8034D40-05F9-458E-83AF-074DA4408D88}

    where after /x and in place of {…} write your setup product key, just copy it from your set up peopertyand save this file any where.

    Add (right-click in Application Folder):

    • Add > File > Uninstall.bat

    • Create New Shortcut > Application Folder > Primary Output (enter a name)

    • Create New Shortcut > Application Folder > Uninstall.bat (enter a name)

    • Add > File > add .ico files you want to use for the shortcuts

    Shortcuts properties > 'icon' property (use the icons you've just added)

    Move the shortcuts to User's Desktop/User's Programs Menu (you can also create subfolders)

    Build > Rebuild 'name project'

    Hope it helps.
    With regards
    Namita


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.