@Echo Off
Title Remove PowerShell Prompts v1.2
Color 1F
cd "%systemroot%\system32"
call :IsAdmin

REM  Remove PowerShell Prompts.
REG delete "HKCR\Directory\shell\MenuPowerShell" /f >NUL 2>&1
REG delete "HKCR\Directory\background\shell\MenuPowerShell" /f >NUL 2>&1
REG delete "HKCR\LibraryFolder\background\shell\MenuPowerShell" /f >NUL 2>&1
REG delete "HKCR\Drive\shell\MenuPowerShell" /f >NUL 2>&1
REG delete "HKCR\Directory\ContextMenus\MenuPowerShell" /f >NUL 2>&1
Exit

:IsAdmin
REG query "HKU\S-1-5-19\Environment" >NUL 2>&1
If Not %ERRORLEVEL% EQU 0 (
 Cls
 Echo You must have administrator rights to continue ... 
 Pause
 Exit
)

Cls
goto:eof
