Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Shell 

Add Open with Notepad to the Windows Context Menu for All Files

Code
@Echo Off & Cls


REM  --> Check for permissions
Reg query "HKU\S-1-5-19\Environment"
REM --> If error flag set, we do not have admin.
if %errorlevel% NEQ 0 (
ECHO                 **************************************
ECHO                  Running Admin shell... Please wait...
ECHO                 **************************************

    goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    set params = "%*:"=""
    echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"

    "%temp%\getadmin.vbs"
    del "%temp%\getadmin.vbs"
    exit /B


:gotAdmin

Cls & Mode CON  LINES=11 COLS=100 & Color 0E & Title Created By FreeBooter
Echo.
Echo.
Echo.
Echo       ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
Echo       º Do You Want To Add Open with Notepad to the Windows Context Menu for All Files (Y/N)? º  
Echo       ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
Echo.
Echo.


Set /p input= RESPONSE:
If /i  Not %input%==Y (Goto :_Ex) Else (Goto :_Start)

:_Ex
If /i Not %input%==N  (Goto :EOF) Else (Goto :_RegRestore)



:_Start

Reg add "HKCR\*\shell\Open with Notepad\command" /ve /t REG_SZ /d "notepad.exe %%1" /f >Nul
Reg add "HKCR\*\shell\Open with Notepad" /v "Icon" /t REG_SZ /d "C:\Windows\Notepad.exe" /f >Nul

Cls & Mode CON  LINES=11 COLS=45 & Color 0E & Title Created By FreeBooter
Echo.
Echo.
Echo.
Echo       ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
Echo       º Open with Notepad Enabled º  
Echo       ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
Echo.
Echo.
ping -n 6 localhost >nul


Exit




:_RegRestore

Reg Query "HKCR\*\shell\Open with Notepad" >Nul

If %ErrorLevel% EQU 1 Goto :EOF


Reg.exe delete "HKCR\*\shell\Open with Notepad" /f >Nul


Cls & Mode CON  LINES=11 COLS=45 & Color 0E & Title Created By FreeBooter
Echo.
Echo.
Echo.
Echo       ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
Echo       º Open with Notepad Disabled º  
Echo       ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
Echo.
Echo.
ping -n 8 localhost >nul

Exit


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by iRazorOct 15, 2021 12:35 PM 3 157 Oct 15, 2021 12:35 PM
Last Post: steel iron
[Shell] by Emre_Jan 12, 2021 11:16 PM 0 141 Jan 12, 2021 11:16 PM
Last Post: Emre_
[Shell] by Emre_May 30, 2020 05:19 AM 5 237 May 30, 2020 05:19 AM
Last Post: Emre_