Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


Runwithlogon and Bad Username

Keywords: 	 Runwithlogon and Bad Username

Question:

I want to use the local admin account on the box using RunWithLogon and when I try it says bad username or password (error 1932 i believe). Thanks for all the help.
runas_user = "Administrator"
runas_pswd = "**********"
runas_domain = ""


RunWithLogon("f:\ptclient.EXE", "/Uninstall c:\ /All", "f:\", @NORMAL, @NOWAIT, runas_user,
runas_domain, runas_pswd,2)
runwithlogon("e:\ptclient.exe", "/InstallClient e:\ c:\ptclient /Service /ShellEx /Client", "e:\", @NORMAL,
@NOWAIT, runas_user, runas_domain, runas_pswd,2)
exit 

Answer:

If you are already logged on as a domain account then leaving "runas_domain" as a blank string may cause your own account's domain name to be implicitly used.

Try setting the value of "runas_domain" to be name of the local computer. If that does not work, leave "runas_domain" as a blank string and prepend the local computer name onto the value of "runas_user" [e.g. "COMPUTERNAME\ACCOUNT"].


Article ID:   W15199