Pakserrion Posted December 12, 2014 Share Posted December 12, 2014 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 More sharing options...
EndFunc Posted December 12, 2014 Share Posted December 12, 2014 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 More sharing options...
jguinch Posted December 12, 2014 Share Posted December 12, 2014 If your MSI package is stored on a network share, the specified user in RunAs must have access to this share. Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
Pakserrion Posted December 15, 2014 Author Share Posted December 15, 2014 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 More sharing options...
jguinch Posted December 15, 2014 Share Posted December 15, 2014 You should use the full path of the MSI : "msiexec /i " & @ScriptDir & "package.msi" Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
Pakserrion Posted December 15, 2014 Author Share Posted December 15, 2014 (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 December 15, 2014 by Pakserrion Link to comment Share on other sites More sharing options...
jguinch Posted December 15, 2014 Share Posted December 15, 2014 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"' ) Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now