Skip to content

Deploy as administrative USER, not system?

Featured Replies

Hi All,

I deploying Visual Studio 2010, and have done so sucessfully.

The difficulty is deploying the documentation.

The command line is "%programfiles%\Microsoft Help Viewer\v1.0\HelpLibManager.exe" /silent /product VS /version 100 /locale en-US /content "%ALLUSERSPROFILE%\Microsoft\HelpLibrary" /sourceMedia \\yourserver.xxx.yz\vs2010\ProductDocumentation\HelpContentSetup.msha

 

which works fine as a user, but not at the NT Authority/system. Apparantly it cannot be install under the system context.

The error I get in the local application log is.

-----------------

The description for Event ID 1013 from source HelpLibManager cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

 

If the event originated on another computer, the display information had to be saved with the event.

 

The following information was included with the event:

 

An error occurred on setting library location ('C:\ProgramData\Microsoft\HelpLibrary\'): System.Security.Principal.IdentityNotMappedException: Some or all identity references could not be translated.

at System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean forceSuccess)

at System.Security.Principal.NTAccount.Translate(Type targetType)

at System.Security.AccessControl.CommonObjectSecurity.ModifyAccess(AccessControlModification modification, AccessRule rule, Boolean& modified)

at System.Security.AccessControl.CommonObjectSecurity.AddAccessRule(AccessRule rule)

at Microsoft.Help.Manager.Models.SettingsProvider.CreateAndAclLocalStore(String location, String currentDomainName, String currentUserName)

at Microsoft.Help.Manager.Models.SettingsProvider.SetLibraryLocation(String location)

 

The handle is invalid

 

----------------------------------

So,

How can I run the command line above, as a normal user with administrative priveleges, without elevating the logged on users priveleges.

Maybe someone can shed some light on the best way to proceed.

Thanks in advance

Kieran

On the program you are running check these settings.

post-4980-0-83947700-1298962085_thumb.jpg

  • Author

On the program you are running check these settings.

Yes,

this runs the command at NT Authority/System.

Also my testing is like this.

Run on the local machine - checking the application log.

Run command as normal user - Error - User must be an administrator

Run command as nt authority\system - Error - As in my first post.

Run command as administrator - Installs fine.

Regards

Kieran

Oh now i get what you wanted to achieve. My bad. What about using the runas command so it will start the installation as administrator?

  • Author

To run the program under system account .you can use psexec like PSExec.exe -i -s -d cmd.exe

 

 

Hi Eswar,

I tried this, same error.

Regards

Kieran

  • Author

Oh now i get what you wanted to achieve. My bad. What about using the runas command so it will start the installation as administrator?

Dont know how to do a runas for a deployment.

I see in a TS I can specify a user. Can I use this to deploy software to an already working machine(not an OSD)?

post-5631-0-86559500-1298992768_thumb.png

Dont know how to do a runas for a deployment.

I see in a TS I can specify a user. Can I use this to deploy software to an already working machine(not an OSD)?

 

Well since is a command running from command prompt you could create a program having "cmd /c runas <parameters> <your program>. You can see the options available for RUNAS from a command prompt.

 

And yes you can run the task sequence. Right click on the task sequence and select advertise. This will create an advertisment for your TS.

  • Author

Well since is a command running from command prompt you could create a program having "cmd /c runas <parameters> <your program>. You can see the options available for RUNAS from a command prompt.

 

And yes you can run the task sequence. Right click on the task sequence and select advertise. This will create an advertisment for your TS.

OK,

It working like this

I have a package for VS2010

I have a TS for VS2010 help

I have specified the VS2010 install must run before the TS.

It all installs fine.

Is it best practice to do it this way?

The runas may be an issue as I would need to pass the administrator password to the script.

Anyway this wat works for me.

Thanks for all the assistance.

Yes there is no reason why not to use a task sequence. You can use it also for installation of alot of applications. Only thing is that you need to have the program to run as SYSTEM to be able to access it from task sequence.But again as you point out you can run it as a different user and it will hide the credentials.

 

When you run a command line you can make it hidden, hence hiding any info to the user.

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.