Quick Search for:  in language:    
Lets,launch,uninstall,your,application,from,w
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
.Net Stats

 Code: 140,189. lines
 Jobs: 425. postings

 How to support the site

 
Sponsored by:

 
You are in:
 

Does your code think in ink?
Login





Latest Code Ticker for .Net.
Click here to see a screenshot of this code!C# to VB.NET Converter
By MAJED_SINJAB on 12/30

(Screen Shot)

Click here to see a screenshot of this code!DX9 Ortho Projection
By Created by: X on 12/30

(Screen Shot)

FileCopier
By Mähr Stefan on 12/30


Click here to see a screenshot of this code!GnuCli
By Mähr Stefan on 12/30

(Screen Shot)

GSP
By Mähr Stefan on 12/30


A__Start and End a Process__A
By Yuri Vishnevsky on 12/29


Web Custom Control (Credit Card)
By Tahir Naveed on 12/29


ScreenCapture
By SpaceMonkey on 12/27


Credit Card Verification XML Web Service
By Tahir Naveed on 12/27


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!

Affiliate Sites



 
 
   

Making Your Own Uninstall (Since there is no way to get a shortcut in your Setup)

Print
Email
 

Submitted on: 12/14/2003 6:39:49 PM
By: N. Kusters  
Level: Intermediate
User Rating: By 3 Users
Compatibility:VB.NET

Users have accessed this article 479 times.
 
 
     Let's you launch the uninstall for your application from within your app

This article has accompanying files
 
 
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

winzip iconDownload 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
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this article(in the Intermediate category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
12/15/2003 11:20:54 AM:Pietro ing. Cecchi
very useful I give 5
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
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.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/15/2003 5:51:10 PM:0C0DE
nice, useful for other things too
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/16/2003 11:58:23 AM:N. Kusters
good to see you guys like it :)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
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.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
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 :)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
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.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | .Net Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.