?
Solved

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

Posted on 2012-03-12
3
Medium Priority
?
313 Views
Last Modified: 2012-08-14
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 ...
0
Comment
Question by:dejandejanovic
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Accepted Solution

by:
Elmar Koschka earned 1000 total points
ID: 37709136
If /u:domain\username is a local admin, then theres no password required i think.
0
 
LVL 14

Assisted Solution

by:brendanmeyer
brendanmeyer earned 1000 total points
ID: 37709153
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/
0
 

Author Closing Comment

by:dejandejanovic
ID: 37709302
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
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the years I've spent many an hour playing on hardened, DMZ'd servers, with only a sub-set of the usual GNU toy's to keep me company; frequently I've needed to save and send log or data extracts from these server back to my PC, or to others, and…
Utilizing an array to gracefully append to a list of EmailAddresses
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question