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. Visual Basic
  4. Uninstalling a program

Uninstalling a program

Scheduled Pinned Locked Moved Visual Basic
questioncsharpvisual-studiohelp
8 Posts 3 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.
  • R Offline
    R Offline
    RyJaBy
    wrote on last edited by
    #1

    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,

    T 1 Reply Last reply
    0
    • R RyJaBy

      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,

      T Offline
      T Offline
      The Man from U N C L E
      wrote on last edited by
      #2

      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]

      R 1 Reply Last reply
      0
      • T The Man from U N C L E

        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]

        R Offline
        R Offline
        RyJaBy
        wrote on last edited by
        #3

        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

        D 1 Reply Last reply
        0
        • R RyJaBy

          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

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          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...

          R 1 Reply Last reply
          0
          • D Dave Kreskowiak

            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...

            R Offline
            R Offline
            RyJaBy
            wrote on last edited by
            #5

            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?

            D 1 Reply Last reply
            0
            • R RyJaBy

              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?

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              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...

              R 1 Reply Last reply
              0
              • D Dave Kreskowiak

                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...

                R Offline
                R Offline
                RyJaBy
                wrote on last edited by
                #7

                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.

                D 1 Reply Last reply
                0
                • R RyJaBy

                  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.

                  D Offline
                  D Offline
                  Dave Kreskowiak
                  wrote on last edited by
                  #8

                  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...

                  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