RUNAS error: Unable to acquire user password

0 pts.
Tags:
Desktops
Hardware
Policies
Security
Windows XP
I am trying to write a VBScript that will use local admin rights to run another script. However, for some reason I can't get the RUNAS command to take the password. I am including my script below:

set WshShell = CreateObject("WScript.Shell") WshShell.Run ("%comspec% /k RUNAS /user:/LocalACCOUNT/LOCALcomputerNAME C:proxyDISABLE.vbs") Wscript.Sleep 500 WshShell.Sendkeys "PASSWORD~" 


The exact error is: RUNAS Error: Unable to acquire user password. I have tried changing the Sleep time to several different values - no luck. Tried switching computer and user name locations - no luck. However, I can use RUNAS when I shift click a program - so I know it works. Any help or advice is greatly appreciated! Jeremy
ASKED: January 24, 2005  3:08 AM
UPDATED: August 20, 2013  6:56 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

I’m no VB guy, but you may want to give this a try. Instead of /user:/LocalACCOUNT/LOCALcomputerNAME, the RUNAS command is looking for the following syntax: /User:localcomputernamelocalusername. I don’t know if RUNAS behaves differently within VB, but that’s the command line syntax.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Pedwards17
    There was a "" between the localcomputername and the localusername parameters when I posted--don't know what happened to it.
    0 pointsBadges:
    report
  • Annbuck
    You can't post backslashes as they have special meaning. Makes swapping information about parts of windows rather unreadable and inaccurate.:-( Other metacharacters may also be stripped but they must be.
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following