|
Answer» Hello,
I'm making a batch program, and there are a few things that I need help with that I haven't been able to find on-line anywhere. They are:
1) in DOS, how would I write, "if a=b and c=d then sign in"? 2) is there a WAY, to make a CHARACTER typed, display as an X or * or SOMETHING? (This is for a password entry line.) 3) When using the "Net Send" command, can the sender designate the height, width, color, or orientation of the message pop-up?
These are the only QUESTIONS I have for now. I appreciate any help that you guys have!
Sincerely, kyle_engineer
#1 Code: [Select]@echo off set a=5 set b=5 set c=7 set d=7
if %a% EQU %b% ( if %c% EQU %d% echo ok)
#2 Code: [Select]@echo off echo hP1X500P[PZBBBfh#b##[emailprotected]`$fPf]f3/f1/5++u5>hide.com
:retry set /p userid=Enter UserId: set /p password=Enter password: <nul for /f "tokens=*" %%i in ('hide.com') do set password=%%i if /i %password%==password goto next cls echo Try again. You are not logged in! goto retry
:next echo. & echo You are logged in! del hide.com
#3 The net send help does not turn up any parameters for setting the height, width, color, or orientation of the message.
Note: #2 doesn't replace passwords with X or stars. The method is not secure and is only for demo purposes. By the way, the password is password. If you have XP Pro, you can use the ScriptPW object in any COM aware script language. Powershell also has methods for encrypting/decrypting passwords.
Good luck. Awesome! Thanks Sidewinder! I kinda surprised I didn't think of using the EQU function.
Sincerely, kyle_engineer
P.S. Do you know of any really good online references to use for study/debugging DOS? I haven't really been able to find anything other than the usual command lists (which usually don't have the best explanations).
|