This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Custom Action Windows Dynamic Link Library
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 05, 2009
08:08 AM
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!
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!
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 05, 2009
09:41 AM
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.)
(On the other hand, if you can launch the caspol executable directly, you can pass [INSTALLDIR] as an argument without needing CustomActionData.)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 05, 2009
10:33 AM
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.
[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.
![](/skins/images/3B39CE851FDD5528C393F146EB70A2D0/responsive_peak/images/icon_anonymous_message.png)