Jump to content
Sign in to follow this  
cheeseslice

runaswait problem with msiexec

Recommended Posts

cheeseslice

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

Share this post


Link to post
Share on other sites
EndFunc

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 by EndFunc

EndFuncAutoIt is the shiznit. I love it.

Share this post


Link to post
Share on other sites
cheeseslice

yes, I tried a runas it does not work either.

Share this post


Link to post
Share on other sites
EndFunc

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.

Share this post


Link to post
Share on other sites
Raven1

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, ...

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×