I'm trying to create a batch file to shutdown my computer from the taskbar on my Surface Pro 3, which I have done successfully on my desktop computer (Both running Windows 8.1), but on my Surface this batch file:
@echo off
SET /p var1 = "Shutdown? (Y/N) "
if /I %var1% == "Y" shutdown /s /t 0
results in an error "Shutdown unexpected at this time." alongside an immediate crash of the command window containing it. This exact (Edit: wording poorly chosen, not actually exact) batch file works as intended on my desktop. A batch file on my Surface simply containing the code:
shutdown /s /t 0
works fine, which is very puzzling to me. I haven't found any solutions from my searches, so any help would be greatly appreciated!