65.9K
CodeProject is changing. Read more.
Home

Running a process as the user that began the install, when creating a Deployment Project

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.50/5 (2 votes)

Nov 17, 2011

CPOL
viewsIcon

22841

Running a process as the user that began the install, when creating a Deployment Project

Visual Studio is very limited when it comes to customizing an installation. This is why most complex products use other setup authoring tools.

Visual Studio setup projects run custom actions with no impersonation by default (msidbCustomActionTypeNoImpersonate). So the quickest solution would be to remove the no impersonation flag by editing the MSI with InstEdit!.

Steps

  1. Open the MSI using the InstEdit!
  2. Navigate through Tables -> Custom Action
  3. Selection Custom Action and Select the source that you need to execute context with NO IMPERSONATE Action.
  4. Click on the TYPE column value for the selected source.
  5. Look for "Execution Context: No Impersonate" and deselect the check box
  6. Save it and you are done!!!
Happy Programming