Jump to content

Script run msi in 64bit from netshare


Recommended Posts

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.

Link to comment
Share on other sites

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

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.

Link to comment
Share on other sites

Why did you put all you code in a same line ?

What is @directory ?

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

runas($susername, $sdomain, $spassword, 2, 'msiexec /i "' & @Scriptdir & '\package.msi"' )
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...