Jump to content

runaswait problem with msiexec


Recommended Posts

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

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.
Link to comment
Share on other sites

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...