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
Shutdown.exe Fails?
Moderator: DosItHelp
Re: Shutdown.exe Fails?
Why do you use "%windir%\system32\cmd.exe" /k ?
This should work:
Regards
aGerman
This should work:
Code: Select all
reg add "hklm\software\microsoft\windows\currentversion\policies\system" /v EnableLUA /t reg_dword /d 0 /f
Regards
aGerman
-
- Posts: 233
- Joined: 21 Nov 2010 08:07
- Location: At My Computer
Re: Shutdown.exe Fails?
Thanks! aGerman that did the trick , also noticed if I used the /c switch instead of the /f that it would contintue on then reboot ..