September 20, 2008

Change MSI to run under custom actions under user account

Filed under: Uncategorized — alexezh @ 9:09 pm

MSI package generated by VS2008 will run custom actions under SYSTEM account. This “feature” was implemented to work around Vista’s UAC. There is no way to change this behavior from VS2008, but you can adjust MSI package using ORCA tool (available in SDK).

Start ORCA tool,
open MSI package,
navigate to custom actions.
Select action which you would like to run under user account and subtract 0x800 from Type. In my case, value generated by VS2008 is 3090, new value should be 1042.
Save MSI back.




  1. Hi,Very important post for me.Thanks.But what can I do, if I have number like 51 in the Type column?In more details, I have msi, that run dll with installer class during Install custom action. When I opening MSI with Orca, I see install action, devided to 2 rows – one for InstallUtil – with number 3073 (1025 after 0x800 substructed) and another custom action with number 51. I I do not changed nothing, I see 4 processes msiexec in TaskManager – 2 with my account, and 2 with System account.After me change 3073 to be 1025, I see 3 processes – 2 with my account, and 1 with system.I think, that my dll (Type = 51) is still running under system account.How can I change this behaviour? I also tried to substruct 800 from 51, but it does not work.Thanks

    Comment by Evgeny — November 18, 2008 @ 11:30 am

  2. I have 4 actions with type 3090 in my setup. I only needed one action to run as a user, so I changed one row to 1042. As a result I have 3 actions running as system and one as a user.I have a row with 52 type named VSDCA_FolderForm_AllUsers. I have not changed anything for this row.

    Comment by AlexEzh — November 27, 2008 @ 6:14 pm

  3. Thanks Alex,I already fixed this – rows with 51/2 are not relevant, I just changed both Install and UnInstall rows and now it works! Very usefull post, I looked for this several days 😦 🙂 !!!

    Comment by Evgeny — January 14, 2009 @ 9:23 am

  4. Dude that is an awesome find, this was a real show stopper for us!

    Comment by Andy — September 8, 2009 @ 5:02 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at WordPress.com.

%d bloggers like this: