| 
	 | 
|   | 
            Terms of Agreement:    
	 By using this article, you agree to the following terms...    
	 1) You may use 
	 this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.    
	 2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.    
	 3) You may link to this article from another website, but ONLY if it is not wrapped in a frame.  
	 4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.   |  |     For better/easyer reading, i just zipped a text file with some better fortmatting. Article below:
    I have been searching my a-s-s off to get a nice uninstall shortcut in my start menu for my own programs. But the setup and deployment does not allow me to.
    Here is what i did:
    Make a setup for your program with the .NET tool, in it's properties, you see a product code (for my prog it's {75FE729D-69D4-4B86-9010-052770DE341F} for example).
    In the add/remove programs window in your software window, your app is listed, and if you click remove, it's launched this way:
    system32 dir \ MsiExec.exe /I{product code}
    so, to do this yourself, in your application, you can do this:
    Private Sub Uninstall()
    Dim myProcess As Process = New Process
    Dim s As String
    ' get the System path
    Dim sysFolder As String = _
    System.Environment.GetFolderPath _
    (Environment.SpecialFolder.System)
    ' set the file name and the command line args
    myProcess.StartInfo.FileName = "cmd.exe"
    myProcess.StartInfo.Arguments = "/C cd " & _
    sysFolder & " && MsiExec.exe /I{75FE729D-69D4-4B86-9010-052770DE341F} && exit"
    ' start the process in a hidden window
    myProcess.StartInfo.WindowStyle = _
    ProcessWindowStyle.Hidden
    myProcess.StartInfo.CreateNoWindow = True
    myProcess.Start()
    ' if the process doesn't complete within
    ' 0.5 second, kill it
    myProcess.WaitForExit(500)
    If Not myProcess.HasExited Then
    myProcess.Kill()
    End If
    myProcess.Close()
    Me.Dispose()
    End Sub
    Now, you have launched a CMD windows, that launches the uninstall for your application.
    Hope it helped.
    CMG |    | 
 Download article
  Note: Due to the size or complexity of this submission,   the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.
  Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.
  FOR YOUR OWN SAFETY, PLEASE: 1)Re-scan downloaded files using your personal virus checker before using it. 2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com
 
  | 
       Terms of Agreement:    
	 By using this article, you agree to the following terms...    
	 1) You may use 
	 this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.    
	 2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.    
	 3) You may link to this article from another website, but ONLY if it is not wrapped in a frame.  
	 4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.   | 
   Other 1 submission(s) by this author
  | 
   |   
|   | 
| Report Bad Submission | 
   | 
 |   | 
| Your Vote! | 
| 
See Voting Log  | 
|   | 
| Other User Comments | 
12/15/2003 11:20:54 AM:Pietro ing. Cecchi very useful
I give 5  
  | 
12/15/2003 11:50:48 AM:N. Kusters Thank you, i have tried to edit it and 
format it better, but i don't see 
annything about codes to use on this 
site, sorry for the bad layout.  
  | 
12/15/2003 5:51:10 PM:0C0DE nice, useful for other things too  
  | 
12/16/2003 11:58:23 AM:N. Kusters good to see you guys like it :)  
  | 
12/18/2003 1:33:29 PM: Brilliant! Just like you, I have spent 
so much time to find the solution for 
uninstallation. Now I've got it. 
Highest vote from me.  
  | 
12/19/2003 3:48:06 PM:N. Kusters hehe, omg, i never thought so manny ppl 
would like this ;) Thanx a million for 
the rating m8 :)  
  | 
 | 
    |   Add Your Feedback! |   
    Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.
  NOTICE: The author of this article has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.
  For feedback not related to this particular article, please click here.     |   
   |