WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

wNT
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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
File Created: 2002:09:05:13:50:32
Last Updated: 2002:09:05:13:50:32