Sign in to follow this  
Followers 0
Gnu3n

RunAs msiexec

5 posts in this topic

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 :unsure:

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! :>

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by PowerCat

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

It worked!

Thank you very much! :unsure:

EDIT: Just for curiosity: what does "/C" do? .. /Call for short?

- Gnu3n

Edited by Gnu3n

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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! :unsure:

Share this post


Link to post
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
Sign in to follow this  
Followers 0