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

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

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
Answered 10/13/2008 by: zipsantro
Purple Belt

Please log in to comment
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)
Answered 10/13/2008 by: paanvimu
Senior Yellow Belt

Please log in to comment
0
Hi Patrick,
just drop all the "IF" in your statements as they are assumed implicitly.
Regards, Nick
Answered 10/13/2008 by: nheim
Tenth Degree Black Belt

Please log in to comment
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
Answered 10/13/2008 by: spartacus
Black Belt

Please log in to comment
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>
Answered 10/13/2008 by: paanvimu
Senior Yellow Belt

Please log in to comment
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.
Answered 10/13/2008 by: zipsantro
Purple Belt

Please log in to comment
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
Answered 10/13/2008 by: spartacus
Black Belt

Please log in to comment
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
Answered 10/13/2008 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
Thanks to all.

The MSI (custom actions) is working fine now.



@moderator: Topic can be closed
Answered 10/13/2008 by: paanvimu
Senior Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity