Gnu3n Posted April 15, 2011 Posted April 15, 2011 Hi Im VERY new to AutoIT scripting, it looks great for my scripting needs tho i just cant seem to get it working as intended, or at all for that fact This is the script i am trying to run, and i have already verified that the acronis "switches" are working by running the entire program string in command prompt. RunAs ("user", "domain", "password", 0, 'msiexec /i "\\path\AcronisAgentWindows.msi" /qb!+ /l*v \\servername\foldername\%COMPUTERNAME%.log LICENSE_SERVER=servername MMS_CMS_ADDRESS=servername MMS_CMS_USER_NAME=User MMS_CMS_PASSWORD=xxxxx GS_SERVICE_USERNAME=domain\user GS_SERVICE_PASSWORD=xxxxx', @TempDir) Im useing Windows 7 x64 by the way, if that in anyway is relevant Any and all help is very welcome!
PowerCat Posted April 15, 2011 Posted April 15, 2011 (edited) Try this: RunAs ("user", "domain", "password", 0, @ComSpec & ' /C msiexec.exe /i "\\path\AcronisAgentWindows.msi" /qb!+ /l*v \\servername\foldername\%COMPUTERNAME%.log LICENSE_SERVER=servername MMS_CMS_ADDRESS=servername MMS_CMS_USER_NAME=User MMS_CMS_PASSWORD=xxxxx GS_SERVICE_USERNAME=domain\user GS_SERVICE_PASSWORD=xxxxx', @TempDir) Edited April 15, 2011 by PowerCat
Gnu3n Posted April 18, 2011 Author Posted April 18, 2011 (edited) It worked! Thank you very much! EDIT: Just for curiosity: what does "/C" do? .. /Call for short? - Gnu3n Edited April 18, 2011 by Gnu3n
PowerCat Posted April 18, 2011 Posted April 18, 2011 According to http://www.robvanderwoude.com/command.php /c means "Close secondary session after execution of string" I have no idea, really. It's a commonly documented "feature" that you need to add /c By the way @ComSpec is command.com, so this is like typing C:\command.com /c c:\windows\system32\msiexec.exe /install c:\blah\test.msi
Gnu3n Posted May 5, 2011 Author Posted May 5, 2011 Hi PowerCat Thank you, you have been very helpfull! I will definitely look here for help next time my company throws me a difficult scripting task!
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