fluff533 Posted June 2, 2009 Share Posted June 2, 2009 I'm having a problem getting my MSI that resides on a network share to execute with the Runas function: This works: RunAs('localadmin', @ComputerName, 'pw', 0, "msiexec /i c:\abc.msi" /qb ALLUSERS=1", @SystemDir) This does not work: RunAs('localadmin', @ComputerName, 'pw', 0, "msiexec /i \\server\volume\directory\abc.msi /qb ALLUSERS=1", @SystemDir) I gather the 'localadmin' account cannot see the server share but I don't know what I need to do to resolve the problem. I need to access the MSI with the logged in domain user account but use the credentials of the local admin account to install the MSI. Can anyone help? I'm new to scripting so...ya know...nuff said. Link to comment Share on other sites More sharing options...
Richard Robertson Posted June 2, 2009 Share Posted June 2, 2009 Try copying it locally first and see if that works. Link to comment Share on other sites More sharing options...
fluff533 Posted June 2, 2009 Author Share Posted June 2, 2009 Yeah...I think I mentioned it works locally in my original post. The problem is I don't want to have to copy the MSI locally - it's fairly big and I have over 1500 workstations. There must be a way to achieve this. Link to comment Share on other sites More sharing options...
Danny35d Posted June 2, 2009 Share Posted June 2, 2009 I gather the 'localadmin' account cannot see the server share but I don't know what I need to do to resolve the problem. I need to access the MSI with the logged in domain user account but use the credentials of the local admin account to install the MSI. Can anyone help? I'm new to scripting so...ya know...nuff said.You are right. localadmin cannot access the server share. You don't have too many choices: 1) Either use a domain account that have admin right on all domain computers and the server share 2) Before using RunAs() copy the msi to the computer, install with RunAs using the code below and then delete the msi. 3) Which I don't like to do. Give everyone permission to the server share. RunAs('localadmin', @ComputerName, 'pw', 0, "msiexec /i c:\abc.msi" /qb ALLUSERS=1", @SystemDir) AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
archgriffin Posted June 2, 2009 Share Posted June 2, 2009 You are right. localadmin cannot access the server share. You don't have too many choices: 1) Either use a domain account that have admin right on all domain computers and the server share 2) Before using RunAs() copy the msi to the computer, install with RunAs using the code below and then delete the msi. 3) Which I don't like to do. Give everyone permission to the server share. RunAs('localadmin', @ComputerName, 'pw', 0, "msiexec /i c:\abc.msi" /qb ALLUSERS=1", @SystemDir) I normally do #3, but its a specific folder that is shared exactly for that purpose, though I am normally using it to uninstall things. "Human kind cannot gain anything without first giving something in return, to obtain; something of equal value must be lost."The Help File is truly your friend. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now