Jump to content

Brand new to AutoIT need help with basic script


Recommended Posts

I need to run this command as a domain administrator

C:\program files\altiris\aclient\aclient.exe /remove /silent

here is what I have that doesn't seem to be working.

RunAsSet("username", "domain", "password")
Run ("C:\program files\altiris\aclient\aclient.exe /remove /silent")
Exit

Any help would be really appreciated, need to get this done so I can start my weekend.

Thanks

Link to comment
Share on other sites

Your possible issue could be the whitespace in the path so use quotes in the path string.

Note that RunAsSet() has been depreciated in current AutoIt versions.

; older versions of autoit use RunAsSet()
RunAsSet("username", "domain", "password")
Run('"C:\program files\altiris\aclient\aclient.exe" /remove /silent', @SystemDir)
RunAsSet()
Exit

Later versions of AutoIt use RunAs()

; latest versions of autoit use RunAs()
RunAs("username", "domain", "password" _
        0, _ ; adjust logon flag as needed
        '"C:\program files\altiris\aclient\aclient.exe" /remove /silent', _
        @SystemDir _
)
Exit

Test and see if that helps. :huh2:

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