A Question here,
Is there an equivalent for the uninstall application option provided with the code below regarding windows service
Because it doesn't recognize keywords as "application" and "close"
Also, while I am at it, how can I at it to a specific folder in the
ProgramsStartFolder.
The issue is that I want to let the user have the option to install/uninstall the WindowsService. The WindowsService is in a separate setup package because when I had it in the application setup the uninstall option for the application would remove the WindowsService also what let to an IO exception. So my solution then is to have a checkbox connected with a vbScript to run the second setup. I hope that will work!
Long story, but that's why I need another uninstall option placed in the same folder as the application, if possible?
Also, is it possible to do a silent install for the second setup without any user interaction, because that would be anoying?
Another thing I found out is that the code beneath doesn't work if you have two primary outputs in the setup.
Is there a workaround for that or am I going to end up with three setups?
Thanks in adv, Richard
Is there an equivalent for the uninstall application option provided with the code below regarding windows service
Because it doesn't recognize keywords as "application" and "close"
Also, while I am at it, how can I at it to a specific folder in the
ProgramsStartFolder.
The issue is that I want to let the user have the option to install/uninstall the WindowsService. The WindowsService is in a separate setup package because when I had it in the application setup the uninstall option for the application would remove the WindowsService also what let to an IO exception. So my solution then is to have a checkbox connected with a vbScript to run the second setup. I hope that will work!
Long story, but that's why I need another uninstall option placed in the same folder as the application, if possible?
Also, is it possible to do a silent install for the second setup without any user interaction, because that would be anoying?
Another thing I found out is that the code beneath doesn't work if you have two primary outputs in the setup.
Is there a workaround for that or am I going to end up with three setups?
VB.NET:
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] arguments [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]String[/COLOR][/SIZE][SIZE=2]() = Environment.GetCommandLineArgs()[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] argument [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]String[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]For[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Each[/COLOR][/SIZE][SIZE=2] argument [/SIZE][SIZE=2][COLOR=#0000ff]In[/COLOR][/SIZE][SIZE=2] arguments[/SIZE]
[SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] argument.Split([/SIZE][SIZE=2][COLOR=#a31515]"="[/COLOR][/SIZE][SIZE=2])(0).ToLower = [/SIZE][SIZE=2][COLOR=#a31515]"/u"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] guid [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]String[/COLOR][/SIZE][SIZE=2] = argument.Split([/SIZE][SIZE=2][COLOR=#a31515]"="[/COLOR][/SIZE][SIZE=2])(1)[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] path [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]String[/COLOR][/SIZE][SIZE=2] = Environment.GetFolderPath(Environment.SpecialFolder.System)[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] si [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] ProcessStartInfo(path & [/SIZE][SIZE=2][COLOR=#a31515]"\msiexec.exe"[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#a31515]"/i "[/COLOR][/SIZE][SIZE=2] & guid)[/SIZE]
[SIZE=2]Process.Start(si)[/SIZE]
[SIZE=2]Close()[/SIZE]
[SIZE=2]Application.Exit()[/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Next[/COLOR][/SIZE]
Thanks in adv, Richard
Last edited: