/build/static/layout/Breadcrumb_cap_w.png

Custom Actions with correct privileges

First, Hello and thank you for a great forum. I have searched for an answear on my problem, but I havent got it right yet.

I have a question about Custom Actions i Vista with UAC. After a good link posted on this forum to this site: http://juice.altiris.com/article/1439/packaging-applications-for-windows-vista i found a solution for my problem with some packages I have made. The custom actions wont run under UAC turned on. At the article I find following paragraph:

Custom actions within the installation that run programs, install .MSI files, or run WiseScripts may not run with the correct privileges. You can customize the package to change the user context in which the custom action runs. The success of this solution depends on whether the custom action can run in the other context.

How can I write my Custom Actions to run with correct privileges? For example I have a custom regsrv32.exe command that do not run with UAC.

Thank you in advanced

0 Comments   [ + ] Show comments

Answers (4)

Posted by: nheim 16 years ago
10th Degree Black Belt
0
Hi Andreas,
see: http://msdn2.microsoft.com/en-us/library/aa372048.aspx
and: http://msdn2.microsoft.com/en-us/library/aa368069.aspx
You need to run the CA deferred (that means in the MSI Script) and with no Impersonation.
Basically, that means, you should run it between the 'InstallInitialize' and 'InstallFinalize' actions.
Then choose the type (most likely 34 or 50) and add 3072 to it.
Hope this leads you on the right track.
Regards, Nick
Posted by: daff 16 years ago
Senior Yellow Belt
0
Thank you Nick for a good answear. This solved the problems.


Andreas
Posted by: jmcfadyen 16 years ago
5th Degree Black Belt
0
my question is why would you want to run regserv in the first place ?

You should be using the registry table to deliver registry after all thats what it was designed for.

If its something fancy that may or may not be done based on target conditions simply condition the component.
Posted by: daff 16 years ago
Senior Yellow Belt
0
Usually I do not use regsvr as CA, but this application needed to unregister and register again all dlls after install to work on Vista. Its not clean, but it now works.

But this question was more ment as in general, not a specific regsvr CA. Thank you for your comment anyway.

AD
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