Jump to content

psexec, msiexec, domain, permissions etc


Recommended Posts

Posted

Setup: RM Schoolshare with Storebox

 

Problem: I am trying to get WPKG up and running. All I now need to do is push the client from the Storebox to the clients. I am using psexec and msiexec but think I am running into permission problems due to the fact that the Storebox is on its own domain but the clients are not members.

 

The client is on a share on the Storebox so I run the command

 

Code

psexec -i -u username -p password @hosts.txt -d msiexec /i "\\Storebox\WPKG\WPKG Client 1.2.1.msi" /qb SETTINGSFILE=\\Storebox\WPKG\settings.xml

 

But this returns the error

Error

"This installation error could not be opened. Verify that the package exists and you can acces it, or contact the application vendor to verify that this is a valid Windows Installer package"

 

As it runs ok from a local account I guess that this looks like a permissions problem. I assume the issue is that msiexec command runs it as the SYSTEM user which is not part of the Storebox domain?

 

So, is there anyway that I can run the command as a local user that is a domain account and could run the installer?

Posted

psexec should run within the user context that you provide via -u if this is a domain admin account then it should be able to both run the task and grab the file.

 

I would test the permissions by attempting to use psexec to simply copy the file to the local hard drive. This will help you rule out file permissions to the storage box.

 

It looks like psexec has some issues with msi installs, some of which may be alleviated by adding the -e switch

PsTools: psexec - user credentials question

Posted (edited)

Thanks for the reply.

 

Actually I have been trying to copy the file to test the permissions:

Code

>psexec \\target machine -u username -p password -e cmd

/c copy "\\Storebox\WPKG\WPKG Client 1.2.1.msi" "c:\WPKG install" -s

 

PsExec v1.94 - Execute processes remotely

Copyright © 2001-2008 Mark Russinovich

Sysinternals - Windows Sysinternals: Documentation, downloads and additional resources

 

 

Access is denied.

cmd exited on target machine with error code 1.

 

but fails with "Access denied" even when the -e flag is set. :confused:

Run locally this works, so I guess the profile isn't being loaded.

Edited by sparkeh
Posted (edited)

How about PSexecing a bat file that maps a drive with the required credentials then runs the setup then unmaps the drive.

 

Or for the most roundabout way you could try PSexecing the RUNAS command on the remote machine :)

 

You could also just try remotely scheduling it to run immediatly under your domain admin account:

How To Use the AT Command to Schedule Tasks

Edited by SYNACK
Posted

Might be clutching at straws/barking up the wrong tree here but if the MSI is failing, is that because you're starting the msiexec process as "you" but that then gets passed to the installer service which I think then runs in the context of the local machine account. Do "domain computers" have read access to the relevant share?

 

This could be a red herring because the copy doesn't work (but that "-s" at the end will cause problems, I think)

Posted

Thanks for the input guys but after trying many approaches I realised I had spent too much time on it and put aside the rest of the day to manually install :(

 

I found that the problem wasn't limited to the msi, any psexec operation that involved just a 'read' operation to a file worked but any 'write' or 'execute' failed.

 

Might be clutching at straws/barking up the wrong tree here but if the MSI is failing, is that because you're starting the msiexec process as "you" but that then gets passed to the installer service which I think then runs in the context of the local machine account.

 

Have been wondering this myself, but I checked the profile that the commands is running under and it seems to be initiated by the correct user account with the correct domain permissions.

After doing a fair bit of reading, I have seen a lot of people saying that using psexec to install an msi is hit and miss at best due to the complexity of them. Anyway, now I have WPKG installed, remote deployment of software shouldn't be a problem anymore.

 

 

that "-s" at the end will cause problems

 

Yeah not sure why that is there but also doesn't work without it :p

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...