UINT __stdcall MyCA(MSIHANDLE hInstall)
{
BOOL bIsRunning = FALSE;
// check for running process code
if( bIsRunning ) {
if( ERROR_SUCCESS!=MsiSetProperty(hInstall,"DEVENV_RUNNING","1") ) {
MessageBox(0,"Error setting property.","My Install",0);
return -1; // or some other error code
}
}
return ERROR_SUCCESS;
}
On 1/10/07, Jason Du Plessis <[EMAIL PROTECTED]> wrote:
Thanks Lvevi.
My question still lies on how to set DEVENV_RUNNING. A custom C++ DLL
would do the trick – with a quick look up for the process id.
But I was hoping that some diligent sole had already crafted one.
------------------------------
*From:* Levi Wilson [mailto:[EMAIL PROTECTED]
*Sent:* 10 January 2007 17:52
*To:* Jason Du Plessis; wix-users@lists.sourceforge.net
*Subject:* Re: [WiX-users] Checking for running process
Off the top of my head you could schedule a Custom Action to run before
LaunchConditions I believe and set a property like DEVENV_RUNNING? Then you
could have a:
<Condition Message="Please close devenv.exe before installing.">NOT
DEVENV_RUNNING</Condition>
I haven't tested this, but it seems like it would work.
On 1/10/07, *Jason Du Plessis* <[EMAIL PROTECTED] > wrote:
Hi,
I need to determine if an application (devenv.exe) is not running as part
of an install. Is there any means of doing this within WiX?
Thanks,
Jason
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users