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
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)
Please log in to answer
Posted by:
zipsantro
15 years ago
Posted by:
paanvimu
15 years ago
@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)
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
Posted by:
spartacus
15 years ago
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
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
@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>
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
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.
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
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
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
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
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
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.