Jump to content

Recommended Posts

Posted

New to AutoIt

trying to automate the runas command for running quickbooks as a local account with admin rights.

Here is my code

Set the RunAs parameters to use Local user account

RunAsSet("username", "%computername%", "password",1)

; Run quickbooks as Local user account with admin rights

RunWait("qbw32.exe","C:\Program Files\Intuit\QuickBooks Pro",)

I figure based on the tutorials this should be semi simple but I continue to get an error.

Line 14 (File "c:\):

RunWait("qbw32.exe","C:\program Files\Intuit\Quickbooks Pro",)

Error: Unable to execute the external program.

The parameter is incorrect.

Please advise

Posted (edited)

You also need to replace RunAsSet("username", "%computername%", "password",1)

with one of the following

Opt("ExpandEnvStrings",1)
RunAsSet("username", "%computername%", "password",1)

or

RunAsSet("username", @ComputerName, "password",1)

Edit: Here's the full code that should work:

RunAsSet("username", @ComputerName, "password",1)
; Run quickbooks as Local user account with admin rights
RunWait("C:\Program Files\Intuit\QuickBooks Pro\qbw32.exe")
Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...