Jump to content

RunAs msiexec


 Share

Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
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

Link to comment
Share on other sites

  • 3 weeks later...

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...