New
#1
Hack notepad.exe to launch .bat file instead of text.
When i run commandit loads bat file as if i click it in windows explorer.Code:c:\windows\explorer.exe d:\run.bat
Now i need to replacenotepad.exe
withexplorer.exe
to be able to run.bat
file.
Tried to replace inwindows\system32\notepad.exe
it won't let me overwrite so i tried this approach found here except that i used this command
Code:Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe] "Debugger"="C:\\Windows\\explorer.exe /C \"%1\" %*"
Now when i go WinKey+R and typeNotepad
it opensexplorer.exe
, however i think i messed up with the last part explorer.exe/C "%1" %*
because it does not belong to explorer, i copied it from cmd.exe/C "%1" %*
, so going to WinKey+R and typingnotepad d:\bat.bat
only opens explorer (not starting.bat
file).
At this point i need to find either how to replacenotepad.exe
withexplorer.exe
inwindows\system32
folder or correct the regedit command so when i do WinKey+R and typenotepad d:\run.bat
actual bat file load.
In case you wonder why i need this, its workaround for this issue with Excel, because excel does not show this warning when link points to.txt
file.
Made excel think it opens text file when link is pointing to to .bat with this trick
Code:Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Classes\.bat] @="txtfile"
Last edited by captainJack; 12 Mar 2024 at 16:36.