right now I have Wix bundle which installs .NET and VC++ as pre-req along with my other MSIs. But the problem is if I run it once, and then run it again while the first one is already running, it doesn't stop the installation. (Multiple instances of the installation are not blocked) I am using BURN. Candle and Light. Sorry, I am a newbie, would appreciate the help. I want it to run only once and possibly display "Another installation is already running" message. Would appreciate help, stuck at this particular problem for too long.
Asked
Active
Viewed 170 times
0
-
are you using standard bootstrapper or custom? – ba-a-aton Aug 12 '21 at 10:26
-
Standard bootstrapper. – sameerawsnoob Aug 12 '21 at 12:24
-
I know how to do it, but only in custom one. can share if needed – ba-a-aton Aug 12 '21 at 16:04
-
Any help would be appreciated... Please do share.. Thanks – sameerawsnoob Aug 13 '21 at 04:46
1 Answers
1
As for me you can try two ways how to do it:
- Custom action:
Just add your msi first in chain and add custom action with check on msi start. Here you can find custom action sample. And here you can find how to run it at start. This way is easy and fast.
- Custom bootstrapper:
This way is little bit long and hard, but it will work too. First of all you need to create your own custom bootstrapper. Here's good step-by-step guide to do it.
After you'll have one just add check before Engine run. It will look like this:
public class CustomBootstrapperApplication : BootstrapperApplication
{
/// <summary>
/// Entry point of managed code
/// </summary>
protected override void Run()
{
if (Process.GetProcessesByName("process_name").Length > 0)
{
MessageBox.Show("process_name is already running");
//not sure messagebox will be good idea here according to MVVM,
//but I guess you'll find way to solve it or... it will work anyway)))
}
//all that engine management stuff
}
}
Little bit overhead, but as result you'll get your own WPF bootstrapper with UI you want.

ba-a-aton
- 574
- 1
- 4
- 14
-
This does look effective. I am sorry, but I am using the BURN method I think. I write the script in an XML file and use Candle and Light with extensions... – sameerawsnoob Aug 14 '21 at 16:05
-
But as least you have msi that you can change? or it's not wix msi? for second option everything will be the same - you'll write xml and will use Candle to burn, but you'll have another project as UI wrapper – ba-a-aton Aug 14 '21 at 18:22
-
The msi is not a Wix MSI. I have a set of MSI which I directly just bundle. Can I use some conditions or any other things like those in my bundle.wxs? Or any other things like that? Thanks.... – sameerawsnoob Aug 16 '21 at 04:53
-
sorry, I don't know are there any conditions and dialogs in bootstrapper. seems like not. you can always add new msi to run that check - it's easiest way – ba-a-aton Aug 16 '21 at 11:43