Hi Neil and Rob,
Thank you for your response.
Yes, I'm trying to do it by using CustomAction. I thought I need to do these
things:
1. Write a DLL to handle the "checking if Outlook is running" work. If it's
running, then set a property.
2. In the WiX code, firstly starting this checking CustomAction; secondly,
checking that property, if it's true then show up a dialog box to warn the user.
So I wrote the DLL(check.dll), and set the property "ShowProgramRunDialog" as 1
if Outlook is running.
But the warning dialog box never showed up. I checked the log, here it is:
Line 230: MSI (c) (B8:18) [11:26:49:677]: Skipping action: ProgRunDlg(condition
is false)
....
Line 408: MSI (s) (F4!BC) [11:26:50:302]: PROPERTY CHANGE: Adding
ShowProgramRunDialog property. Its value is '1'.
Apparently, the property "ShowProgramRunDialog" was set after the dialog box
code part. So I wonder why it happened. How can I make sure the "checking if
Outlook is running" task got run before "the warning dialog box display"
statements.
I realized this might be because the sequence, InstallExecuteSequence vs.
InstallUISequence. But I don't know how to fix it. Could you please take a look
at my code and correct me?
Here is my code:
<Binary Id="CheckIt" SourceFile="check.dll" />
<CustomAction Id="CheckingIt" BinaryKey="CheckIt" DllEntry="CheckIt" />
<InstallExecuteSequence>
<Custom Action="CheckingIt" Before="CostFinalize" />
</InstallExecuteSequence>
<UI>
<Dialog Id="ProgRunDlg" ...>
... define the dialog ...
</Dialog>
<InstallUISequence>
<Show Dialog="ProgRunDlg" After="WelcomeDlg">NOT Installed AND
ShowProgramRunDialog = "1"</Show>
</InstallUISequence>
</UI>
Thanks you all!
Brian
________________________________
From: Rob Mensching <[email protected]>
To: General discussion for Windows Installer XML toolset.
<[email protected]>
Sent: Thursday, January 8, 2009 10:30:56 PM
Subject: Re: [WiX-users] How to detect program running and display a message box
You *can* do it v2. You just need to write the CustomAction or port
CloseApplication down... lots more work than v3.
-----Original Message-----
From: Neil Sleightholm [mailto:[email protected]]
Sent: Thursday, January 08, 2009 22:24
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to detect program running and display a message box
I don't think you can do this in v2 but in v3 you can use
<util:CloseApplication />
Neil
-----Original Message-----
From: Little Forest [mailto:[email protected]]
Sent: 08 January 2009 22:16
To: [email protected]
Subject: [WiX-users] How to detect program running and display a message
box
I'd like to do these in 2.0:
1. Detect if a program(e.g. Outlook.exe) is running
2. If it's running, display a message box to ask the user to close it;
if it's not running, don't show it and keep installing process.
Can any one give some code example?
Thanks in advance.
Brian
__________________________________________________________________
Ask a question on any topic and get answers from real people. Go to
Yahoo! Answers and share what you know at http://ca.answers.yahoo.com
------------------------------------------------------------------------
------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
__________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr!
http://www.flickr.com/gift/
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users