Command Prompt windows 7 batch file password problem?
-
Hello I'm creatung a batch file for a windows 7 computer that when run will start up command prompt in administrator mode, I have gotten so far as the user is then promted to enter the CMD password, I have this password but I was wondering if there was a way for the pass word to be entered automatically so the user would not have to enter it?
-
Answer:
That kind of defeats the purpose of having a password, but ok. Let's say you kept your password "Password" in a text file called "%username%.pwd Here's the code: echo off cls set /p Username=Username: Set CorrectPW=Password :Begin cls if not exist "%username%.pwd" set /p Password=Password: if exist "%username%.pwd" set /p Password=< "%username%.pwd" if /i %Password%==%CorrectPW% goto LoggedIn if /i NOT %Password%==%CorrectPW% goto Begin :LoggedIn cls Echo Username: %Username% echo Password:%Password%
Patrick d at Yahoo! Answers Visit the source
Related Q & A:
- In Visual Studio 2012 or 2013, how can I register a DLL file on Windows 7 64-bit computer using a Custom Action command?Best solution by Stack Overflow
- How can I change a password with windows 7?Best solution by Yahoo! Answers
- How Do I Fix This Windows 7 Wireless Connection Problem?Best solution by Yahoo! Answers
- Is it illegal to change your IP through the command prompt?Best solution by Yahoo! Answers
- Windows 7 screen resolution problem?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.