echo set WshShell = CreateObject("WScript.Shell") >%windir%\Temp\NumLock.vbs
echo WshShell.SendKeys "{NumLock}" >>%windir%\Temp\NumLock.vbs
for /f %%i in ('powershell -command [console]::NumberLock') do if not "%%i"=="True" WScript.exe /b %windir%\Temp\NumLock.vbs>nul
del /f /q %windir%\Temp\NumLock.vbs