Uninstalling a program
-
Hi, I have a question on what the proper way to remove a installed program from a computer is. If i go to the control panel and use the add/remove programs, it will remove the program, however, if i create shortcuts to that program, those remain on the computer. Is there a special uninstall program function that comes with visual studio maybe? or is there a way to remove all files associated with the program? I would like the user to be able to simply push a button and everything that was installed with the program, shortcuts, files. If anyone can help me with this, it would be greatly appreciated. Thanks,
-
Hi, I have a question on what the proper way to remove a installed program from a computer is. If i go to the control panel and use the add/remove programs, it will remove the program, however, if i create shortcuts to that program, those remain on the computer. Is there a special uninstall program function that comes with visual studio maybe? or is there a way to remove all files associated with the program? I would like the user to be able to simply push a button and everything that was installed with the program, shortcuts, files. If anyone can help me with this, it would be greatly appreciated. Thanks,
If your installation creates the shortcuts and so on then un-installing from add/remove programs will remove the shortcuts. If the end user manually creates shortcuts later on then there nothing you can do as part of the un-install process to find them and remove them. They could be anywhere, and named anything, and are totally out of your control. However, if your installer is creating the shortcuts programmatically then your uninstall code should be written to remove them programatically. Sloppy [rogramming to leave them behind.
If you have knowledge, let others light their candles at it. Margaret Fuller (1810 - 1850) [My Articles] [My Website]
-
If your installation creates the shortcuts and so on then un-installing from add/remove programs will remove the shortcuts. If the end user manually creates shortcuts later on then there nothing you can do as part of the un-install process to find them and remove them. They could be anywhere, and named anything, and are totally out of your control. However, if your installer is creating the shortcuts programmatically then your uninstall code should be written to remove them programatically. Sloppy [rogramming to leave them behind.
If you have knowledge, let others light their candles at it. Margaret Fuller (1810 - 1850) [My Articles] [My Website]
Well there is a function in the program that when you push a button, it creates a shortcut in the start up folder. If I remove the program while the shortcut is in the startup folder, it doesnt disappear. I guess I am wondering, how do you make an uninstall program for an application? Thanks
-
Well there is a function in the program that when you push a button, it creates a shortcut in the start up folder. If I remove the program while the shortcut is in the startup folder, it doesnt disappear. I guess I am wondering, how do you make an uninstall program for an application? Thanks
That depends on where the icon is put. If it's in the All User Startup folder, you can remove it. If it's in the Users Startup folder you have to leave it there. Why? Enumerating every users Startup folder is time consuming and, depending on who's doing the uninstall, the uninstall will not have permissions to see everyone's Startup folder.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009... -
That depends on where the icon is put. If it's in the All User Startup folder, you can remove it. If it's in the Users Startup folder you have to leave it there. Why? Enumerating every users Startup folder is time consuming and, depending on who's doing the uninstall, the uninstall will not have permissions to see everyone's Startup folder.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009... -
Well all the uninstall program would need to do is see the current users startup folder. I dont know how to go about creating an uninstall program to uninstall the program. How would i do that?
You don't have to write another program to uninstall the app. You just add the .LNK file to the RemoveFile table in the .MSI using Orca or some other .MSI editing tool.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009... -
You don't have to write another program to uninstall the app. You just add the .LNK file to the RemoveFile table in the .MSI using Orca or some other .MSI editing tool.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009... -
Okay so now i downloaded orca so i can edit the .MSI but now i need to know how to get the .MSI file. Does visual studio automatically create one? If so, how can i find it, if not how can i create one? Thanks for your help, I really appreciate it.
Uhhh...you already said you have an installer. What is it?? VS does NOT create an .MSI automatically. It's a project you have to add to your solution that gets compiled using the outputs of your main project. Express Editions of VS do not have this option. Or you use some third party packaging software, like InnoSetup or Wise Package Studio, to create the .MSI.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009...