Skip to content

Deploy App as Local Admin for std user

Featured Replies

Hi all, I need to an deploy an application (HP TRIM 7.1) to all Win7 x64 PCs that must install for the user, not system. However, it seems that TRIM can only install if the user is a local administrator. Management is adamant that noone is to be a local admin to any PC which makes it a bit difficult.

 

Are there any settings in SCCM 2012 that can elevate a standard Windows account momentarily for an app installation? If not, can this be done through a script? I don't know anything about TRIM, just that it deploys for local admins but not std users.

  • Author

I thought I'd try a Powershell script that adds the current user to the Local Admins group, then installs the TRIM .msi file. As thus:

 

$cname = $env:computername
$localmachine = "$cname/" + "Administrators"
$uname = $env:username
$currentuser = "domain/" + "$uname"

 

[ADSI]$user="WinNT://$currentuser,User"
[ADSI]$LocalAdmin="WinNT://$localmachine,group"

$LocalAdmin.Add($user.Path)

 

I figured that if it was deployed from SCCM it would run under the SYSTEM account. It came up with an Access Denied error though. Any ideas on how I could get this working?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.