cheeseslice Posted November 12, 2009 Share Posted November 12, 2009 Hi, I have been reading through the forums but I can't seem to find an answer for this problem and I'm wondering if I can get a bit of help. DriveMapAdd ("K:",$appLocation,1,$domain & $username,$password) RunAsWait($username, $doamin, $password, 0, @Comspec & " /c " & "msiexec /i k:\setup.msi","",@SW_HIDE) Basically all I want to do is install a piece of software from a shared application folder onto a few workstations. When I run this script I get an error message saying that the installation pacakge could not be opened, which would suggest that the path is wrong yet if I use the following code it works: DriveMapAdd ("K:",$appLocation,1,$domain & $username,$password) Run("msiexec /i k:\setup.msi") Obviously the above code won't work on remote stations as the msiexec needs to be run with my administrator credentials but I can't seem to find a way around this problem. Thanks Link to comment Share on other sites More sharing options...
EndFunc Posted November 12, 2009 Share Posted November 12, 2009 (edited) Hi, I have been reading through the forums but I can't seem to find an answer for this problem and I'm wondering if I can get a bit of help. DriveMapAdd ("K:",$appLocation,1,$domain & $username,$password) RunAsWait($username, $doamin, $password, 0, @Comspec & " /c " & "msiexec /i k:\setup.msi","",@SW_HIDE) Basically all I want to do is install a piece of software from a shared application folder onto a few workstations. When I run this script I get an error message saying that the installation pacakge could not be opened, which would suggest that the path is wrong yet if I use the following code it works: DriveMapAdd ("K:",$appLocation,1,$domain & $username,$password) Run("msiexec /i k:\setup.msi") Obviously the above code won't work on remote stations as the msiexec needs to be run with my administrator credentials but I can't seem to find a way around this problem. Thanks Well did you try a RunAs? DriveMapAdd ("K:",$appLocation,1,$domain & $username,$password) RunAs($user, $domain, $passowrd, 2, "msiexec /i k:\setup.msi") Edited November 12, 2009 by EndFunc EndFuncAutoIt is the shiznit. I love it. Link to comment Share on other sites More sharing options...
cheeseslice Posted November 12, 2009 Author Share Posted November 12, 2009 yes, I tried a runas it does not work either. Link to comment Share on other sites More sharing options...
EndFunc Posted November 12, 2009 Share Posted November 12, 2009 yes, I tried a runas it does not work either.Is everything else working? Is the drive being mapped? do you get an error or do you know if its trying to run it or now? EndFuncAutoIt is the shiznit. I love it. Link to comment Share on other sites More sharing options...
Raven1 Posted November 13, 2009 Share Posted November 13, 2009 Hi, I have been reading through the forums but I can't seem to find an answer for this problem and I'm wondering if I can get a bit of help. DriveMapAdd ("K:",$appLocation,1,$domain & $username,$password) RunAsWait($username, $doamin, $password, 0, @Comspec & " /c " & "msiexec /i k:\setup.msi","",@SW_HIDE) Basically all I want to do is install a piece of software from a shared application folder onto a few workstations. When I run this script I get an error message saying that the installation pacakge could not be opened, which would suggest that the path is wrong yet if I use the following code it works: DriveMapAdd ("K:",$appLocation,1,$domain & $username,$password) Run("msiexec /i k:\setup.msi") Obviously the above code won't work on remote stations as the msiexec needs to be run with my administrator credentials but I can't seem to find a way around this problem. Thanks In your code snippet, you spell the variable $domain 2 different ways. Maybe this is where the problem is? RunAsWait($username, $doamin, $password, ... 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