Jump to content


  • 0
kkontour

Deploy as administrative USER, not system?

Question

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

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0

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

Share this post


Link to post
Share on other sites

  • 0

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

Share this post


Link to post
Share on other sites

  • 0

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.

Share this post


Link to post
Share on other sites

  • 0

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.

Share this post


Link to post
Share on other sites

  • 0

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.

Share this post


Link to post
Share on other sites

Join the conversation

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

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.