@ECHO OFF CLS SET ad = SET /p ad = Do you want to [A] Allow or [D] Deny? ECHO "%ad%"
A and press
Enter, and the output I get is:
Do you want to [A] Allow or [D] Deny? ""
Why doesn't it work?
You aren't setting
Some languages are more picky about whitespace than others. The
If you're writing the script for Windows 7/8 only, I strongly recommend learning PowerShell instead. The language used by cmd.exe is awful.
|show 6 more comments|
The command processor in Windows 8 is unchanged from the one in Windows 7, as far as I know
Everything up to the equals sign is part of the variable name. So in this case, your variable name is actually