Retrieving information for text file

July 6, 2009 at 01:11:29
Specs: Windows Vista

I want to create a program so that when it is run for the first time it asks for the user to set a password, and when it is run after the first time, it asks for that password before continuing on...

I can make it ask for the password, and then store that in a text document, But then how do I make so it gets the information from the text file and stores it in a variable so i can compare the passwords? Also, how can I make the program know if its the first time it has been run or not?

Thanks in advance.

See More: Retrieving information for text file

Report •

July 6, 2009 at 01:29:20
you are not going to be able to do password input easily in batch as you will need to take care of keeping the password safe, as well as not echoing the password to screen. you may want to try using Perl or Python, which have modules for reading input for passwords without echoing to screen. also, you may also want to consider changing your approach, maybe set up a password database , or doing a GUI interface (or HTA) which will mask out the password for you

GNU win32 packages | Gawk

Report •

July 6, 2009 at 03:53:09
Thanks for the advise.
I managed to work out how to do it, but yea, the file that holds the password is only hidden.. so anyone can just check "show hidden files" and they would be able to see it.

Report •

Related Solutions

Ask Question