Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Windows Registry Editor Version 5.00
- [HKEY_CLASSES_ROOTDirectoryshellrunas]
- @="Open Command Window Here as Administrator"
- [HKEY_CLASSES_ROOTDirectoryshellrunascommand]
- @="cmd.exe /s /k pushd "%V""
- REGEDIT4
- [HKEY_CURRENT_USERSoftwareMicrosoftCommand Processor]
- "Autorun"="cd /d "%userprofile%""
- Windows Registry Editor Version 5.00
- [HKEY_CURRENT_USERSoftwareMicrosoftWindows NTCurrentVersionAppCompatFlagsLayers]
- "C:\Windows\System32\cmd.exe"="~ RUNASADMIN"
- "C:\Windows\SysWOW64\cmd.exe"="~ RUNASADMIN"
- [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionAppCompatFlagsLayers]
- "C:\Windows\System32\cmd.exe"="~ RUNASADMIN"
- "C:\Windows\SysWOW64\cmd.exe"="~ RUNASADMIN"
- Windows Registry Editor Version 5.00
- [HKEY_CLASSES_ROOTDirectoryBackgroundshellcmda]
- @="Open command window here (Administrator)"
- "HasLUAShield"=""
- "Extended"=""
- [HKEY_CLASSES_ROOTDirectoryBackgroundshellcmdaCommand]
- @="cmda.exe /s /k pushd "%V""
- Windows Registry Editor Version 5.00
- [HKEY_LOCAL_MACHINESoftwareMicrosoftWindows NTCurrentVersionAppCompatFlagsLayers]
- @="C:\Windows\System32\cmd.exe"="RUNASADMIN"
- Windows Registry Editor Version 5.00
- ;write minus before to unreg example: [-HKEY_CLASSES_ROOTDirectoryshellcmdhere]
- [HKEY_CLASSES_ROOTDirectoryshellcmdhere]
- @="Open Command Window Here"
- [HKEY_CLASSES_ROOTDirectoryshellcmdherecommand]
- @="cmd.exe /s /k pushd "%V""
- [HKEY_CLASSES_ROOTDirectoryBackgroundshellcmdhere]
- @="Open Command Window Here"
- [HKEY_CLASSES_ROOTDirectoryBackgroundshellcmdherecommand]
- @="cmd.exe /s /k pushd "%V""
- [HKEY_CLASSES_ROOTDirectoryshellrunas]
- @="Open Command Window Here as Administrator"
- [HKEY_CLASSES_ROOTDirectoryshellrunascommand]
- @="cmd.exe /s /k pushd "%V""
- [HKEY_CLASSES_ROOTDirectoryBackgroundshellrunas]
- @="Open Command Window Here as Administrator"
- [HKEY_CLASSES_ROOTDirectoryBackgroundshellrunascommand]
- @="cmd.exe /s /k pushd "%V""
- @echo off
- :: BatchGotAdmin
- :-------------------------------------
- REM --> Check for permissions
- >nul 2>&1 "%SYSTEMROOT%system32cacls.exe" "%SYSTEMROOT%system32configsystem"
- REM --> If error flag set, we do not have admin.
- if '%errorlevel%' NEQ '0' (
- echo Requesting administrative privileges...
- goto UACPrompt
- ) else ( goto gotAdmin )
- :UACPrompt
- echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%getadmin.vbs"
- echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%getadmin.vbs"
- "%temp%getadmin.vbs"
- exit /B
- :gotAdmin
- if exist "%temp%getadmin.vbs" ( del "%temp%getadmin.vbs" )
- pushd "%CD%"
- CD /D "%~dp0"
- :--------------------------------------
Add Comment
Please, Sign In to add comment