|When run my batch and prompt for to type their username, if there is a space in the username the script fails when I press enter to accept the username.|
echo "Enter an Administrator Username"
set /p UserName=
if "%USERNAME%" NEQ "%RunAsUser%" (
RUNAS /user:%RunAsUser% "cmd /c c:\regocx\regocx.bat"||PAUSE
Why??? it runs fine with no spaces but I need it to run with spaces in the username also.
How can I RUNas using a username with a space (i.e John Doe)?