/build/static/layout/Breadcrumb_cap_w.png

Custom Action help

I am trying to run a custom action as a first step of my MSI. I want my MSI to run the custom action before anything else. We have a custom.exe which does some cleanup prior to the installation. Can someone please tell me what would be my Install Exec Sequence & Condition be?

0 Comments   [ + ] Show comments

Answers (5)

Posted by: chichora123 12 years ago
Fourth Degree Green Belt
0
ok, so looks like it works pretty well if i set my Install Exec Sequence to run After LaunchCondition

Install Exec Sequence> After LaunchCondition
Install Exec Condition> REMOVE=ALL
Posted by: jmcfadyen 12 years ago
5th Degree Black Belt
0
if it is modifying the system as I expect it is based on the name.

It should be scheduled early as possible in the deferred phase. Although it is bad practice to do it in the immediate phase you can get away with it in Corporate land because the installing user will always be an admin account.

I would advise against it if you can help it. By running during the immediate phase you are basically stating the installation will only complete for an admin user.
Posted by: captain_planet 12 years ago
Black Belt
0
Are you really sure it has to be run right at the start of the Install Execute sequence? (Eg, Before the evaluation of Launch Conditions, AppSearch etc) I'm pretty sure if the custom.exe is just removing a few files/registry/other junk then you should be fine scheduling it immediately after InstallInitialize, and Deferred in a system context.

" cleanup prior to the installation"
If that's the case, your condition should be:
Not Installed
Posted by: anonymous_9363 12 years ago
Red Belt
0
My thoughts more or less exactly. What does the CA do that the RemoveFile and RemoveRegistry tables can't do?
Posted by: jmcfadyen 12 years ago
5th Degree Black Belt
0
the golden rule of packaging if you modifys the system in any way the CA "MUST" be deferred.

this is because you only have access to the system context on the installer service during this time. If you attempt to run this during the immediate phase you are implicitly saying you will inherit the user context of the initiating user.

this in turn means it will fail if the initiating user is a non admin.

vbscab is spot on as always it would be better to use native tables where suitable.
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