/build/static/layout/Breadcrumb_cap_w.png

How to running custom action during install/remove sequence?

I'am using "Installshield 12 Prof"
I have created a custom actions that execute the following:
---begin custom action RegisterVNCServerService---
Executable Filekey = winvnc4.exe
Command Line = -register
Return Processing = Synchonous (check exit code)
In-script Execution = Immediate Execution
Execution scheduling = Always execute
Install Exec Sequence = After InstallFinalize
---end custom action RegisterVNCServerService---

The question is:
Ho do i edit the custom action above to run only during installation of the MSI?

The second question is:
During removing the MSI i want to run the following custom action;
---begin custom action UnregisterVNCServerService---
Executable Filekey = winvnc4.exe
Command Line = -unregister
Return Processing = Synchonous (check exit code)
In-script Execution = Immediate Execution
Execution scheduling = Always execute
Install Exec Sequence = After InstallFinalize
---end custom action UnregisterVNCServerService---

I have searched the forum, but could not find the solution.

I think the solution has something to do with "Install Exec Condition", but i do not understand the use of the "Condition Builder dialog"
If someone has the solution for me, i would be very thankfull.

Thans in advance.
Greetings,
Patrick

0 Comments   [ + ] Show comments

Answers (9)

Posted by: zipsantro 15 years ago
Purple Belt
0
To run a custom action only at the time of installation, you can use condition (IF Not Installed).
In the same way to run a particualr CA at the time of uninstallation you can use (IF REMOVE~="ALL").

Cheers!
Santro
Posted by: paanvimu 15 years ago
Senior Yellow Belt
0
@Santro;

When i insert het condition IF Not Installed or IF REMOVE~="ALL" in the field Install Exec Condition,
I get the following error "An invalid conditional statement was supplied"

I also tried IF NOT INSTALLED, but with the same error.

For the information, i am creating/editing the custom actions in the "direct editor - custom action view" (admin sttudio 8 / installshield 12 professional)
Posted by: nheim 15 years ago
10th Degree Black Belt
0
Hi Patrick,
just drop all the "IF" in your statements as they are assumed implicitly.
Regards, Nick
Posted by: spartacus 15 years ago
Black Belt
0
If you are using InstallShield, you can drop the "If" statement.

Just insert "Not Installed" and insert REMOVE~="ALL" into the Install Exec condition fields for your respective install and uninstall custom actions.

You would only need the If statements if you were using (say) the MSI Script editor in WISE Package Studio.

Regards,

Spartacus
Posted by: paanvimu 15 years ago
Senior Yellow Belt
0
@Nick, Spartacus: Thanks for the advise, now i don't get that error anymore.

My final question in this topic (i think) Can i ignore this warnings (during building F7)

---begin warning---

ISDEV : warning -6525: The Custom Action UnregisterVncServerService in the InstallExecuteSequence table is run from an installed file. It must be sequenced after the CostFinalize action. Ensure that the Custom Action is sequenced properly and that the base actions exists in the sequence.
ISDEV : warning -6525: The Custom Action UnregisterVncServerService in the InstallExecuteSequence table is run from an installed file. It must be sequenced after the InstallFiles action. Ensure that the Custom Action is sequenced properly and that the base actions exists in the sequence.
---end warning---

I have set the Install Exec Sequence = <First action>
Posted by: zipsantro 15 years ago
Purple Belt
0
Goto ModuleInstallExecuteSequence Table and you row should look like this-
Action=UnregisterVncServerService, Seqouence=0, BaseAction=CostFinalize, After=1,Condition=[Respective Condition]

Make sure that you will have an entry of CostFinalize as well in ModuleInstallExecuteSequence Table like this
Action=CostFinalize, Sequence=1000.
This entry should be created automatically if any CA is being sequenced before or after CostFinalize, but in some cases user has to do it manually.

Cheers!
Santro.
Posted by: spartacus 15 years ago
Black Belt
0
As this CA is only running on uninstallation and you have applied the condition REMOVE~="ALL", then it is reasonable to assume the the winvnc4.exe file will be around on the system when you need to execute it with your CA. The CA will probably still work OK scheduled where it is.

But if the build messages are troubling you, you could always move the CA to schedule after InstallFiles, (as the second message advises) and this would implicitly address the first message as well.

Regards,

Spartacus
Posted by: nheim 15 years ago
10th Degree Black Belt
0
Hi Patrick,
did not read exactly what you are up to, at first.
You MUST make this CA's deferred, because they are changing the system!
The "RegisterVNCServerService" needs to be placed somewhere after the "InstallFiles" action, better right before "InstallServices".
The "UnregisterVNCServerService" must be placed before "RemoveFiles", better right before the "DeleteServices" action.

Regards, Nick
Posted by: paanvimu 15 years ago
Senior Yellow Belt
0
Thanks to all.

The MSI (custom actions) is working fine now.



@moderator: Topic can be closed
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ