Jump to content

Recommended Posts

Posted

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

Posted (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 by EndFunc
EndFuncAutoIt is the shiznit. I love it.
Posted

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

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

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