cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JoderCoder
Level 8

Custom Action Windows Dynamic Link Library

I call a function in a windows installer dynamic link library that we wrote..

The function performs some caspol operations. It needs to know the INSTALLDIR of the files and it also needs to be executed after files are copied to the target machine. So I thought the CA needs to be a deferred action in system context. However, in that case, MsiGetProperty() doesnt get the INSTALLDIR, it is null. If I do an immediate action, INSTALLDIR is returned but then the files are not copied to the target machine so it is too early to do Caspol.

Can someone help me to figure out what is wrong here?

Thanks in advance!
Labels (1)
0 Kudos
(2) Replies
RobertDickau
Flexera Alumni

For a deferred code action to get a property, you'll need to go through CustomActionData; the help topic "Accessing or Setting Windows Installer Properties Through Deferred, Commit, and Rollback Custom Actions" has an overview, and searching these forums for "CustomActionData" will turn up many examples.

(On the other hand, if you can launch the caspol executable directly, you can pass [INSTALLDIR] as an argument without needing CustomActionData.)
0 Kudos
JoderCoder
Level 8

Great, thanks, I will try the "CustomActionData".

[CODE](On the other hand, if you can launch the caspol executable directly, you can pass [INSTALLDIR] as an argument without needing CustomActionData.)[/CODE]

Thats what I was doing, however, caspol shows the command prompt windows when executing and it doesnt take an argument or such to do it silently. So I am going to supress the windows programmatically.
0 Kudos