Jump to content

RunAsSet


Guest whitneyr78
 Share

Recommended Posts

Guest whitneyr78

I'm trying to add a script that will install quickbooks 2004 to a few users on my network. The users don't have appropriate permissions to install the software, so I've decided to try RunAsSet.

I think my script is correct:

-----------------------------------------------------------------------------

; Set the RunAs parameters to use domain adminstrator account

RunAsSet("Administrator", "Domain", "password")

;AutoItSetOption ( "RunErrorsFatal", 0 )

; First lock user input from the keyboard and mouse

BlockInput(1)

SplashTextOn("", @LF & "Please wait while QuickBooks 2004 is being installed.", 640, 300, -1, -1, 1, "Arial", 28)

Sleep(1000)

Run("K:\QuickbooksPro2004\setup.exe")

-----------------------------------------------------------------------------

If I comment out the RunAsSet line it will execute the installer, but if I leave it in I get the following error:

Run("K:\QuickbooksPro2004\setup.exe")

Error: Unable to execute the external program.

The system cannot find the path specified.

Any ideas? :whistle:

Thanks,

-Rob

Link to comment
Share on other sites

Guest whitneyr78

Good thought Larry, but that wasn't it.

The K: drive is a network drive.

I just did some more testing. Here's what I've found:

If I log into another computer, it works for me (I have admin rights)

If a user on another computer runs the script, it works

If I log in as administrator on another machine, it works

So it turns out it's My machine!

Anyone have any ideas how to fix that!?

Thanks again,

-Rob

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