BenKell
Posts: 11
Joined: Tue Aug 07, 2012 11:07 pm

Possible to Create Admin Installer Which Runs Parts as User?

Good Afternoon All -

I've got a project I need to deploy with SCCM. After trying a few different configurations unsuccessfully, I thought I could perhaps create a package with what I'm trying to do. The only catch is that some of the commands need to be run as admin and others as the logged on user and our standard users are not set as local admins (or this would be easy). Below are the steps...

1. Run .reg file to change one value (must run as admin)
2. Run an EXE file "addcalendar.exe "littech"" (must be run as logged on user as it changes settings in their exchange profile)
3. Run .reg file to change one value (reversing value changed in step 1 - must be run as admin)

Is it possible to create a package which will work for this using Advanced Installer?

In SCCM, it won't work as task sequences cannot run steps as the currently logged in user. I also created 3 different Programs in a Package and made them dependent on each other and run at login but that didn't work either.

Any ideas? Thanks!
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Possible to Create Admin Installer Which Runs Parts as U

Hello,

In order to achieve what you want you can try to create a per-user only installation package. Then, you can add the related files as temporary files to your project and launch them using "Launch file or open URL" custom actions, added in "Custom Actions" page and scheduled after "Install Execution Stage -> Add Resources" action group.

Also, the first and the third custom action should run as deferred with no impersonation and the second custom action should run only as deferred.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
BenKell
Posts: 11
Joined: Tue Aug 07, 2012 11:07 pm

Re: Possible to Create Admin Installer Which Runs Parts as U

Great - Thank You!

I'm going to try this out now. I do have a question about it, though. For the test, I've got 2 registry (.reg) files that need to be deployed which I am going to create an MSI package for. I created a new project, set it to per-user, and have already imported both the user and system .reg files. Once done, I'll build the MSI.

I'm using SCCM 2012 to deploy it, but am trying to figure out how I can do so successfully. Here is my question:

If I deploy the MSI being run as the SCCM service account (which has local admin rights), will it only apply the user reg keys to the SCCM service account's profile? The reason I ask is because I've got a few projects where I need to deploy user registry keys but they must be in a task sequence. By design, SCCM Task Sequences cannot run steps as users - only as admins.

Thanks Again!
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Possible to Create Admin Installer Which Runs Parts as U

Hello,

If you have a per-user installation package, then the related registry key will be added only for current user. Also, please keep in mind that a per-user installation cannot install registry under HKLM registry hive. So, your registry key should be added under HKCU.

Also, if you want to install a registry key under HKCU for all users you can take a look on our "Adding HKCU entries to registry for all users" thread.

If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”