Shutdown.exe Fails?
Posted: 15 Feb 2011 09:34
The below batch works in turning off the UAC and says "The operation completed successfully" then just stops there and won't do the shutdown command. I am sure it something simple that I am overlooking but any help would be most appreciated. P.S. also specified dos color will not work as well...
@echo off&setlocal&color 0c&mode con: cols=75 lines=20
title [ Disable User Account Control - Windows 7 ]
:Suppress UAC consent prompt dialog to "Never notify"
"%windir%\system32\cmd.exe" /k "%windir%\system32\reg.exe add hklm\software\microsoft\windows\currentversion\policies\system" /v EnableLUA /t reg_dword /d 0 /f
"%windir%\system32\cmd.exe" /k "%windir%\system32\reg.exe add hklm\software\microsoft\windows\currentversion\policies\system" /v ConsentPromptBehaviorAdmin /t reg_dword /d 0 /f
shutdown.exe -f -r -t 0&endlocal&exit
@echo off&setlocal&color 0c&mode con: cols=75 lines=20
title [ Disable User Account Control - Windows 7 ]
:Suppress UAC consent prompt dialog to "Never notify"
"%windir%\system32\cmd.exe" /k "%windir%\system32\reg.exe add hklm\software\microsoft\windows\currentversion\policies\system" /v EnableLUA /t reg_dword /d 0 /f
"%windir%\system32\cmd.exe" /k "%windir%\system32\reg.exe add hklm\software\microsoft\windows\currentversion\policies\system" /v ConsentPromptBehaviorAdmin /t reg_dword /d 0 /f
shutdown.exe -f -r -t 0&endlocal&exit