3 Replies - 679 Views - Last Post: 10 July 2014 - 09:36 AM Rate Topic: -----

#1 Gmichael   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 33
  • Joined: 05-September 12

created visual studio app uninstall?

Posted 10 July 2014 - 06:58 AM

Hello everyone and thank you for taking the time to read this. I have created an application in visual studio and have published using the visual studio installer. When I install the application it shows up in my program and features and I can uninstall it from there. Would anyone know of a way to uninstall from command prompt or another way. As I created a gui that will install it and other programs along with it. So basically a cheap installer. But I would like to add an uninstall option to that gui that will remove my program from the computer. Please let me know of any possible ways to do this. I've tried to use command prompt calling the programs and features but the list does not contain the program even though it's visible to me in programs and features when I go there. Any direction will be greatly appreciated. It's written in c#.

Thank you,

Is This A Good Question/Topic? 0
  • +

Replies To: created visual studio app uninstall?

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15359
  • View blog
  • Posts: 61,582
  • Joined: 12-June 08

Re: created visual studio app uninstall?

Posted 10 July 2014 - 07:02 AM

WMIC seems logical..

http://www.sevenforu...pt-windows.html
http://systemmanagem...ers-using-wmic/
http://technet.micro...y/bb742610.aspx
Was This Post Helpful? 0
  • +
  • -

#3 Skydiver   User is online

  • Code herder
  • member icon

Reputation: 7136
  • View blog
  • Posts: 24,244
  • Joined: 05-May 12

Re: created visual studio app uninstall?

Posted 10 July 2014 - 07:36 AM

Or why jump through all those hoops of going through WMI and/or WMIC when you can just make the API call directly: MsiConfigureProduct()
Was This Post Helpful? 0
  • +
  • -

#4 Skydiver   User is online

  • Code herder
  • member icon

Reputation: 7136
  • View blog
  • Posts: 24,244
  • Joined: 05-May 12

Re: created visual studio app uninstall?

Posted 10 July 2014 - 09:36 AM

A quick side note. You may end up having to resort to using WMIC or the command-line, though. It depends in how your program is architected and deployed. The problem is the reverse of the chicken and egg problem: if your program is executing, how will your binaries be deleted?

One solution is to insert a scheduled task that will do the uninstall.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1