Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. setup and deployment

setup and deployment

Scheduled Pinned Locked Moved C#
sysadminquestionworkspace
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    D i x y
    wrote on last edited by
    #1

    Hello friends, I am developing an windows application setup project using setup wizard. now what i want to add uninstall feature in setup application. So how can i add uninstall feature to setup project...

    F 1 Reply Last reply
    0
    • D D i x y

      Hello friends, I am developing an windows application setup project using setup wizard. now what i want to add uninstall feature in setup application. So how can i add uninstall feature to setup project...

      F Offline
      F Offline
      fearless stallion
      wrote on last edited by
      #2

      Add the Following to the beginning of your Applications Main() # region For UnInstaller string[] arguments = Environment.GetCommandLineArgs(); foreach (string argument in arguments) { if (argument.Split('=')[0].ToLower() == "/u") { string guid = argument.Split('=')[1]; string path = Environment.GetFolderPath(Environment.SpecialFolder.System); ProcessStartInfo si = new ProcessStartInfo(path + "\\msiexec.exe", "/x " + guid); Process.Start(si); Application.Exit(); Environment.Exit(0); } } # endregion Go to the Installer project and add a shortcut to the Primary output and rename it to Uninstall <Application Name> Go to the Properties of the newly added shortcut and Set the Arguments property to "/u=[ProductCode]" Place the shortcut in the user's programs menu. Create a build and your application is ready with Uninstaller. thanks

      kss

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups