Solved

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

Posted on 2012-03-12
3
290 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
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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

803 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