Jump to content

Recommended Posts

Posted

Hi there , i've to setup a script that install a msi packet in a 64 bit windows seven as a domain admin user  , i need some help to make it work, :

Global $username = "user"
Global $password = "psw"
Global $domain = "dom"


runas("$susername", "$sdomain", "$spassword", 2, "msiexec /i package.msi /qn /L*v c:\test.txt" )

when i run it a msgbox from windows installer tell me that is impossible to open the install package. Verify that i got the rights or contact the producer, verify that the packes is valid .

 

Sorry for my english.

Posted

Are you using the correct package name and the full path to the msi file? 

Also you probably need to specify the working directory as well. The help file for RunAs suggests that it is needed.

It is important to specify a working directory the user you are running as has access to, otherwise the function will fail.

 

EndFuncAutoIt is the shiznit. I love it.
Posted

The msi package is included in a zip file with the script that is deployed with OCS inventory , i don't know in which folder he will store the files , i can launch the msi from the share but i don't know the syntax, i'm using this scrip because i need to use a domain admin for install that msi because he connect to a restrict server.

Posted (edited)

I tried like you suggest but i've got an error at Line 7 "unable to parse line."

Global $username = "user" Global $password = "psw" Global $domain = "dom" runas("$susername", "$sdomain", "$spassword", 2, "msiexec /i" & @directory & "\package.msi" )
Edited by Pakserrion

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
  • Recently Browsing   0 members

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