We help IT Professionals succeed at work.

Batch line code for "Enter the password for domain\username:" ?

dejandejanovic
on
Hello,
I have below batch script, which is open TimeDate control panel application. Code works fine, but I would like to integrade also password, so that user would not each time on execute batch file to enter password.

So, how does look batch code for "Enter the password for domain\username:" ???

runas /u:domain\username "control timedate.cpl,,/Z"

Open in new window


Thank you ...
Comment
Watch Question

Senior System Engineer
BRONZE EXPERT
Commented:
If /u:domain\username is a local admin, then theres no password required i think.
runas doesn't support passwords being entered via batch scripts

have a look at:
http://www.joeware.net/freetools/tools/cpau/index.htm - used this quite good
or here are a few others
http://www.commandline.co.uk/sanur/

Author

Commented:
Thank you for help. By your tips, and websites direction found a proper solution for my project. Saving credentials...
For first time it is need to enter password, then for all next opens, credentials are saved on OS, and does not prompt for password.


RUNAS /SAVECRED

Explore More ContentExplore courses, solutions, and other research materials related to this topic.