cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
AndreiNz
Level 2

Copy file from Target system into INSTALLDIR

Jump to solution

Hi,

I am trying to add one extra step to my Basic MSI setup. This step is to copy Oracle.DataAccess.dll from the local(on the target system) oracle installation to the essentially INSTALLDIR. To do so I've created .net exe which scan Windows registry in order to find this file. I use Custom action to call this file and pass INSTALLDIR to it as a parameter. The sequence I use is Deferred Execution  in System Context. This is because the setup is run as Administrator. 

It all works good as long as Default INSTALLDIR is used. If customer selects other target(installation) directory then all installation files are placed into this new directory.  But Oracle.DataAccess.dll ends up in the default INSTALLDIR location. It looks like INSTALLDIR was not updated after  customer selected new target directory. I tried to change Install Exec Sequence to different option but did not get what I want. Current value is: After Publish Features.

Thanks for any help

PS: InstallShield 2016 Professional Edition Version 23

Labels (1)
0 Kudos
(1) Solution
jsclarktexas
Level 4

Properties must be handled to get 'over the wall" between immediate and deferred.

Search your User Guide for CustomActionData
You will find something like this:

Note • Deferred, commit, and rollback custom actions in Basic MSI and InstallScript MSI installations have access to only
some of the built-in Windows Installer properties: CustomActionData, ProductCode, and UserSID. If you want a custom action
to access any other properties (such as SUPPORTDIR) during deferred, commit, or rollback execution, you need to pass them as
CustomActionData. To learn more, see Accessing or Setting Windows Installer Properties Through Deferred, Commit, and
Rollback Custom Actions.

View solution in original post

(2) Replies
jsclarktexas
Level 4

Properties must be handled to get 'over the wall" between immediate and deferred.

Search your User Guide for CustomActionData
You will find something like this:

Note • Deferred, commit, and rollback custom actions in Basic MSI and InstallScript MSI installations have access to only
some of the built-in Windows Installer properties: CustomActionData, ProductCode, and UserSID. If you want a custom action
to access any other properties (such as SUPPORTDIR) during deferred, commit, or rollback execution, you need to pass them as
CustomActionData. To learn more, see Accessing or Setting Windows Installer Properties Through Deferred, Commit, and
Rollback Custom Actions.

HI jsclarktexas,

 

Thank you for your reply. I was heading in this direction before, but the result was the same. After your replay, I've noticed an option to use a component name instead of [INSTALLDIR] like [$myComponet] as a CustomActionData. This change works for me. 

Thank you for pointing me to the right direction. 

0 Kudos