Click here to Skip to main content
15,891,316 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Writing Evaluation Software Pin
rwestgraham4-Apr-05 9:52
rwestgraham4-Apr-05 9:52 
GeneralSome little projects in Java Pin
Member 18347913-Apr-05 22:03
Member 18347913-Apr-05 22:03 
GeneralRe: Some little projects in Java Pin
Dave Kreskowiak11-Apr-05 8:14
mveDave Kreskowiak11-Apr-05 8:14 
Generalretrieving executing machine's IP (not 127.0.0.1) Pin
De'Boss2-Apr-05 19:36
sussDe'Boss2-Apr-05 19:36 
GeneralRe: retrieving executing machine's IP (not 127.0.0.1) Pin
S. Senthil Kumar3-Apr-05 20:23
S. Senthil Kumar3-Apr-05 20:23 
GeneralRe: retrieving executing machine's IP (not 127.0.0.1) Pin
Dave Kreskowiak11-Apr-05 8:11
mveDave Kreskowiak11-Apr-05 8:11 
Questionhow to Add Uninstall Option in Start Menu Pin
Adnan Siddiqi1-Apr-05 23:08
Adnan Siddiqi1-Apr-05 23:08 
AnswerRe: how to Add Uninstall Option in Start Menu Pin
rwestgraham3-Apr-05 9:10
rwestgraham3-Apr-05 9:10 
OK, there are at least two ways to do this. The "right" way and the "wrong" way. Or perhaps a better way to put it is the "long" way and the "wrong" way.

The "long" way is to use Orca or some other MSI package editor and manually add the shortcuts and other stuff to make it work. That is complicated, and I will assume that if you knew how to do it, you would have done it already. Smile | :)

So here is the "wrong" way. This is kind of a hack because the VS NET Setup IDE provides very limited functionality.

1) Add msiexec.exe to your setup project. You can find it in the WinSys folder. It only adds 63KB to your package, no big deal.

2) This app will be used to execute the uninstall. VERY IMPORTANT! Make sure you configure it to be installed in the WinSys folder! The reason is if you put it anywhere else, the uninstall will lock up because it will try to uninstall msiexec.exe, but it cannot because that is what is running the uninstall. (You could put it somewhere besides the WinSys folder and mark it as permanent, but that would be poor form.)

On Win2K and higher this file is part of the Windows File Protection. It does not ever actually install (or try to uninstall) because it is protected. The setup basically ignores it, but you have to include it in your setup for the purpose of having a target to create the uninstall shortcut.

If your setup may be run on Win98 or NT4, you need to install msiexec.exe to the WinSys folder and mark it as permanent, because W98 and NT4 do not have the WFP found in higher Windows versions and the package will try to uninstall it and lockup.

(I hope that makes sense?)

If you did not understand the above explanation, don't worry. Just make sure the msiexec.exe is installed in the WinSys folder and mark it as permanent for good measure and it will work on all Windows OS versions.

3) Once you have added the msiexec.exe file, create the Uninstall shortcut wherever you want it to be. (I'm assuming you know how to do this in VS NET IDE.

4) Set the properties for the Uninstall shortcut:

Working Folder: System Folder (probably does not matter what this is set to actually).
Target: msiexec.exe


Your setup is now configured to run msiexec.exe when the user clicks the Uninstall shortcut.

5) Now you have to add the command line arguments. You have two switch options:
/i
/x

The /i switch will cause the setup to run in repair mode which gives the user the option to uninstall.

The /x switch will start the setup to uninstall only.

At face value, you would think that /x is the preferred switch. But there is sometimes a problem with it. It displays a dialog that asks you if you are sure you want to uninstall. But the dialog does not always appear on top, and if it does not, many users will think nothing has happened. (Try it both ways, /i and /x, you'll see what I mean.)

6) Add the Product code GUID after the switch to complete the command line arguments. You can find this in the Setup Project properties page as "ProductCode". Copy the GUID as is.

When you are done, the Property page for your Uninstall shortcut should look something like this, except your GUID will be different of course:

Name: Uninstall
Arguments: /i{1FD74ECE-4A34-434E-AC0C-A8B720844332}
Target: msiexec.exe
Working Folder: System Folder

That should do it.

Since there are a number of steps, please repost that you got it working, or else post if you have probelms. I tested this on Win2K. If you set it up properly it WILL work.

Robert
GeneralRe: how to Add Uninstall Option in Start Menu Pin
Adnan Siddiqi3-Apr-05 18:48
Adnan Siddiqi3-Apr-05 18:48 
GeneralRe: how to Add Uninstall Option in Start Menu Pin
rwestgraham4-Apr-05 9:31
rwestgraham4-Apr-05 9:31 
GeneralCall DTS package From vb.net Pin
Sagar Jagadale1-Apr-05 19:57
Sagar Jagadale1-Apr-05 19:57 
GeneralRe: Call DTS package From vb.net Pin
Kodanda Pani3-Apr-05 19:13
Kodanda Pani3-Apr-05 19:13 
GeneralMaximum control size Pin
SolidRock1-Apr-05 11:26
SolidRock1-Apr-05 11:26 
GeneralRe: Maximum control size Pin
MoustafaS17-Apr-05 3:06
MoustafaS17-Apr-05 3:06 
GeneralRe: Maximum control size Pin
Anonymous18-Apr-05 8:53
Anonymous18-Apr-05 8:53 
QuestionHow can I add text/line on the video using C# AudioVideoPlayback? Pin
hyliu20051-Apr-05 8:18
hyliu20051-Apr-05 8:18 
AnswerTry DirectShow instead. Pin
ursus zeta2-Apr-05 7:50
ursus zeta2-Apr-05 7:50 
GeneralCreating Flat Files using vb.net Pin
Sagar Jagadale1-Apr-05 0:05
Sagar Jagadale1-Apr-05 0:05 
GeneralRe: Creating Flat Files using vb.net Pin
Colin Angus Mackay1-Apr-05 7:49
Colin Angus Mackay1-Apr-05 7:49 
GeneralRe: Creating Flat Files using vb.net Pin
Sagar Jagadale1-Apr-05 19:33
Sagar Jagadale1-Apr-05 19:33 
GeneralMCP certification help Pin
satishrg31-Mar-05 9:41
satishrg31-Mar-05 9:41 
GeneralRe: MCP certification help Pin
Kodanda Pani31-Mar-05 18:37
Kodanda Pani31-Mar-05 18:37 
GeneralRe: MCP certification help Pin
satishrg5-Apr-05 15:18
satishrg5-Apr-05 15:18 
GeneralRe: MCP certification help Pin
Kodanda Pani5-Apr-05 17:45
Kodanda Pani5-Apr-05 17:45 
GeneralRe: MCP certification help Pin
Claudio Grazioli3-Apr-05 21:04
Claudio Grazioli3-Apr-05 21:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.