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 Sequence to Modify Files Content During Installation
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
‎Sep 07, 2008
10:51 PM
Custom Action Sequence to Modify Files Content During Installation
I have some data files need to be modified after copying into target machine. For this, i create two custom action.
The first custom action is to run the installscript that will modify the content of the files after copying into targetdir. The second custom action is to remove the files during uninstallation.
Here i try with two types of first custom action (InstallDataFiles):
1.
Return Processing : Synchronous(ignores exit code)
In-script Execution : Immediate Execution
Execution Scheduling : Always execute
Use 64bit : no
Install UI sequence :
Install Exec Sequence : After InstallFinalized
Install Exec Condition : &feauture_name=3 AND NOT Installed
Admin UI Sequence :
Admin Exec Sequence :
Admin Exec Condition :
MSI type number : 65536
> As result, the installsript is not run. The last dialog displayed during installation showing "The wizard was interrupted before [ProductName] could be completely installed. Your system has not been modified....". The same dialog displayed when I run the wizard for uninstallation.
> Somehow, I found that the files is in the installed in target machine, but not modified.
> The dialog shows that the installation not complete, but why the files is installed and I could run uninstall in later time.
2.
Return Processing : Synchronous(ignores exit code)
In-script Execution : Deferred Execution in System Context
Execution Scheduling : Always execute
Use 64bit : no
Install UI sequence :
Install Exec Sequence : After Install Files
Install Exec Condition : &feauture_name=3 AND NOT Installed
Admin UI Sequence :
Admin Exec Sequence :
Admin Exec Condition :
MSI type number : 68608
> Same end dialog display during installation, but the files is not installed in target machine.
> I think this should be more appropriate sequence for the custom action. However, the installation is not succeed.
Please tell me how could I create the custom action to modify the files content after files copied into target machine. I am pretty sure that the installscript has no problem, as I could run it in another setup before.
Thanks in advance.
The first custom action is to run the installscript that will modify the content of the files after copying into targetdir. The second custom action is to remove the files during uninstallation.
Here i try with two types of first custom action (InstallDataFiles):
1.
Return Processing : Synchronous(ignores exit code)
In-script Execution : Immediate Execution
Execution Scheduling : Always execute
Use 64bit : no
Install UI sequence :
Install Exec Sequence : After InstallFinalized
Install Exec Condition : &feauture_name=3 AND NOT Installed
Admin UI Sequence :
Admin Exec Sequence :
Admin Exec Condition :
MSI type number : 65536
> As result, the installsript is not run. The last dialog displayed during installation showing "The wizard was interrupted before [ProductName] could be completely installed. Your system has not been modified....". The same dialog displayed when I run the wizard for uninstallation.
> Somehow, I found that the files is in the installed in target machine, but not modified.
> The dialog shows that the installation not complete, but why the files is installed and I could run uninstall in later time.
2.
Return Processing : Synchronous(ignores exit code)
In-script Execution : Deferred Execution in System Context
Execution Scheduling : Always execute
Use 64bit : no
Install UI sequence :
Install Exec Sequence : After Install Files
Install Exec Condition : &feauture_name=3 AND NOT Installed
Admin UI Sequence :
Admin Exec Sequence :
Admin Exec Condition :
MSI type number : 68608
> Same end dialog display during installation, but the files is not installed in target machine.
> I think this should be more appropriate sequence for the custom action. However, the installation is not succeed.
Please tell me how could I create the custom action to modify the files content after files copied into target machine. I am pretty sure that the installscript has no problem, as I could run it in another setup before.
Thanks in advance.
(7) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 08, 2008
09:27 AM
The first thing to keep in mind is that files aren't copied or deleted until deferred execution, so you might change your actions from immediate (when MSI is creating its to-do list) to deferred (when it's carrying out its to-do list)...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 08, 2008
08:43 PM
Thanks RobertDickau for reply.
You could see that in my second custom action, I am using:
- In-script Execution : Deferred Execution in System Context
This still not working..
I am wondering how could this error occur. So I try to just call the same custom action, but this time the installscript only showing an information messagebox. Again, the same error happened.
You could see that in my second custom action, I am using:
- In-script Execution : Deferred Execution in System Context
This still not working..
I am wondering how could this error occur. So I try to just call the same custom action, but this time the installscript only showing an information messagebox. Again, the same error happened.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 08, 2008
09:11 PM
The problem is with any custom action I created.
For testing, I create new project with one feature and one component and no files. Then I have one installscript function just to call "Messagebox (szMsg, INFORMATION)". This function call using a new installscript custom action with immediate execution after installFinalize.
Again, the same error. Here is the log file, please have a look and discuss.
InstallShield 9:51:38: CallScriptFunctionFromMsiCA() ends
Action ended 9:51:38: NewCustomAction1. Return value 3.
Action ended 9:51:38: INSTALL. Return value 3.
MSI (s) (50:AC) [09:51:38:702]: MainEngineThread is returning 1603
MSI (s) (50:24) [09:51:38:702]: Destroying RemoteAPI object.
MSI (s) (50:14) [09:51:38:734]: Custom Action Manager thread ending.
MSI (c) (94:B0) [09:51:38:734]: Back from server. Return value: 1603
MSI (c) (94:B0) [09:51:38:734]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (94:B0) [09:51:38:734]: PROPERTY CHANGE: Deleting SECONDSEQUENCE property. Its current value is '1'.
Action ended 9:51:38: ExecuteAction. Return value 3.
MSI (c) (94:B0) [09:51:38:734]: Doing action: SetupCompleteError
Action start 9:51:38: SetupCompleteError.
Action ended 9:51:39: SetupCompleteError. Return value 2.
Action ended 9:51:40: INSTALL. Return value 3.
=== Logging stopped: 9/9/2008 9:51:40 ===
MSI (c) (94:B0) [09:51:40:015]: Note: 1: 1708
MSI (c) (94:B0) [09:51:40:015]: Product: customaction-test -- Installation operation failed.
MSI (c) (94:B0) [09:51:40:015]: Grabbed execution mutex.
MSI (c) (94:B0) [09:51:40:015]: Cleaning up uninstalled install packages, if any exist
MSI (c) (94:B0) [09:51:40:015]: MainEngineThread is returning 1603
For testing, I create new project with one feature and one component and no files. Then I have one installscript function just to call "Messagebox (szMsg, INFORMATION)". This function call using a new installscript custom action with immediate execution after installFinalize.
Again, the same error. Here is the log file, please have a look and discuss.
InstallShield 9:51:38: CallScriptFunctionFromMsiCA() ends
Action ended 9:51:38: NewCustomAction1. Return value 3.
Action ended 9:51:38: INSTALL. Return value 3.
MSI (s) (50:AC) [09:51:38:702]: MainEngineThread is returning 1603
MSI (s) (50:24) [09:51:38:702]: Destroying RemoteAPI object.
MSI (s) (50:14) [09:51:38:734]: Custom Action Manager thread ending.
MSI (c) (94:B0) [09:51:38:734]: Back from server. Return value: 1603
MSI (c) (94:B0) [09:51:38:734]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (94:B0) [09:51:38:734]: PROPERTY CHANGE: Deleting SECONDSEQUENCE property. Its current value is '1'.
Action ended 9:51:38: ExecuteAction. Return value 3.
MSI (c) (94:B0) [09:51:38:734]: Doing action: SetupCompleteError
Action start 9:51:38: SetupCompleteError.
Action ended 9:51:39: SetupCompleteError. Return value 2.
Action ended 9:51:40: INSTALL. Return value 3.
=== Logging stopped: 9/9/2008 9:51:40 ===
MSI (c) (94:B0) [09:51:40:015]: Note: 1: 1708
MSI (c) (94:B0) [09:51:40:015]: Product: customaction-test -- Installation operation failed.
MSI (c) (94:B0) [09:51:40:015]: Grabbed execution mutex.
MSI (c) (94:B0) [09:51:40:015]: Cleaning up uninstalled install packages, if any exist
MSI (c) (94:B0) [09:51:40:015]: MainEngineThread is returning 1603
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 09, 2008
12:42 AM
The problem solved now.. It is because I passed the incorrect argument to the installscript function 😮 😮 😮
But my Install Exec Condition seems not correct. I want to remove the files when feature2 is uninstall, so I put the condition:
Install Exec Condition : !feauture2=3 AND Remove="ALL"
However, the custom action is not launched during uninstallation.
But my Install Exec Condition seems not correct. I want to remove the files when feature2 is uninstall, so I put the condition:
Install Exec Condition : !feauture2=3 AND Remove="ALL"
However, the custom action is not launched during uninstallation.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 09, 2008
06:18 PM
Keep in mind that property names are case sensitive: perhaps try REMOVE="ALL" instead of Remove="ALL"? And if you care only about a feature being uninstalled, perhaps leave out the REMOVE part and just use something like:
(&YourFeature=2) AND (!YourFeature=3)
(&YourFeature=2) AND (!YourFeature=3)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 09, 2008
08:55 PM
Hi RobertDickau, you really help me a lot. The exec condition now is working as what I want after change it to (&YourFeature=2) AND (!YourFeature=3).
Thanks a lot.:D
Thanks a lot.:D
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 09, 2010
11:12 AM
Im trying to get a custom action to run at active setup.
My custom action is a vbs file.
install exec sequence - AfterPublishProduct
Install Exec Condition - Not Installed
Stub path for Active setup in registry it does run but the CA is not executing at active setup.
the StubPath Reg key for active setup is - msiexec.exe /fauvs [ProductCode] /qn
How can i get this to run the custom action at logon.
I think i resolved this now.
I used a custom action of Not Installed OR Installed
My custom action is a vbs file.
install exec sequence - AfterPublishProduct
Install Exec Condition - Not Installed
Stub path for Active setup in registry it does run but the CA is not executing at active setup.
the StubPath Reg key for active setup is - msiexec.exe /fauvs [ProductCode] /qn
How can i get this to run the custom action at logon.
I think i resolved this now.
I used a custom action of Not Installed OR Installed
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)