?
Solved

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

Posted on 2012-03-12
3
Medium Priority
?
304 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-H 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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…
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
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…

764 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