Solved

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

Posted on 2012-03-12
3
293 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 250 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 250 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Suggested Solutions

Title # Comments Views Activity
Changing $PATH variable - OS X 2 79
Bash Script to Analyze Oracle Schemas 11 125
Using an inventory file in a script 7 41
AWK use math to add new field - single file 5 45
This Windows batch file is useful for organizing image files from a digital camera or other source, but can have many other uses.  It simply renames the file(s) to match their create date.  For example, if you took a picture today at 1:40pm and the …
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…

756 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