Can you post your CA C++ code? Also, you don't need to have a DLL custom
action to check for the existence of a file. You can do something like this
in your WiX source:
<Property Id="MyFileExists">
<DirectorySearch Id="MyDirSearch" Path="some path here" Depth="1">
<FileSearch Id="MyFileSearch" Name="myfile.extension" />
</DirectorySearch>
</Property>
If the file has been found, then the MyFileExists property will be set to
the full path of your file. Is this what you're looking for?
On 3/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I read that "managed code" in a custom action is a no-no (please forgive
me if I use the wrong terminology) so I am attempting to write my custom
action without using managed code. Most examples I find seem to use it,
however, so I'm doing the best I can.
I wrote a simple VC++ app (.exe) that will determine if some files exist.
I probably did it badly, but it worked in that context.
I took the same code, and cut& paste into a VC++ file I had setup to
create my dll.
The code was previously a working snippet that would simply set a msi
property to "true" and return ERROR_SUCCESS.
I am now trying to make it do something useful.
After the cut& paste I got some build errors and followed (somewhat) the
steps listed here to resolve them.
http://support.microsoft.com/?kbid=814472
The dll built successfully, but when I run the installer I get error 2896,
"Executing action [2] failed." That doesn't tell me too much.
I stepped backwards until I had one line that I could comment/uncomment to
make the dll work(return "true")/not work(error 2896)
The one line that causes it to fail (and concequently causes the dll to
double in size) is:
ifstream fin1(filename);
Down the road I was doing 'if (fin1.good())' to see if the file exists
(like I said, probably a bad way, but it was the first thing I did that
seemed to work)
Is attempting to do this fundamentally wrong?
Also, I'm running the installer with /l* but I'm still not getting
anything particularly helpful. Are there better techniques for debugging?
-------------------------------------------------------------------------
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