Hit "send" to soon. Here is a basic function from my DLL that does the check
when called via a CustomAction:
UINT TYSETUP_API tyMsiFindFile(MSIHANDLE hInstall)
{
#ifdef _DEBUG
// Display messagebox, so debugger can attach to process
::MessageBox(0,"tyMsiFindFile: Attach the debugger...\n\nCompiled: "
__TIMESTAMP__ ,"MSI Debug",MB_ICONINFORMATION | MB_OK);
#endif
char PathName[MAX_PATH];
DWORD PathLen = MAX_PATH;
// PATHTOFILE is set by the user through some kind of interaction
MsiGetProperty (hInstall, "PATHTOFILE", PathName, &PathLen);
WIN32_FIND_DATA fileData;
HANDLE searchHandle = NULL;
searchHandle = FindFirstFile( PathName, &fileData );
MsiSetProperty ( hInstall, "FOUNDFILE",
( searchHandle == INVALID_HANDLE_VALUE ) ? "0" : "1" );
return ERROR_SUCCESS;
}
Hope this helps!
Chris
_____
From: Chris Putman [mailto:chr...@gm...]
Sent: Wednesday, March 29, 2006 12:37 PM
To: 'Erik Hochweller'; 'wix...@li...'
Subject: RE: [WiX-users] Directory Search
I do not think you can. If you want to do a file check like this during the
UI-interaction process, you need to use a custom action. Of course if I'm
wrong, then I'll learn something new today :)
_____
From: wix...@li...
[mailto:wix...@li...] On Behalf Of Erik Hochweller
Sent: Wednesday, March 29, 2006 12:24 PM
To: wix...@li...
Subject: [WiX-users] Directory Search
I have this,
<Property Id="FILEEXISTS">
<DirectorySearch Id="CheckFileDir" Path="[PATH TO LOOk AT]" Depth="0">
<FileSearch Id="CheckFile" Name="Lookfor.txt" />
</DirectorySearch>
</Property>
No the way it work i assume is that when the installation is started it
checks this, but what if i want to make a check, so a user enters the path
and upon the next click i want this to be executed and if ok then proceed...
so my questioni s how do i invoke this upon the next click?
Erik
|