Solved Replacing Notepad with another Notepad

Feuer

Fatal Error
Member
Local time
9:53 AM
Posts
113
Location
Turkiye
I will uninstall UWP Notepad App
I will remove Microsoft.Windows.Notepad.System~~~~0.0.1.0 from capabilities

I want to use another notepad
address of new notepad is
d:\StupidFiles\CrackedApps\notepad.exe

I want to have shellnew menu new txt file
I want to have "open" option for Notepad's default file types [.log, .ps1, .psd1, .psm1, txt, .scp, .wtx]
I want to have "edit" option for Notepad's default file types [bat, .cmd, . reg, .VBE, .VBS, .WSF, .Xaml, .Xbap]

What i need to do? It is more complicated than I think?


I made a script SEE THE 13TH POST
 
Last edited:

My Computer

System One

  • Operating System
    Windows 11 21H2 Home Single Language
    Computer type
    Laptop
    Manufacturer/Model
    Hometech ALFA400C
    CPU
    I'm ashamed to talk about it...
    Motherboard
    There is no such a God, I only know mother-Earth
    Memory
    3GB :(
    Graphics Card(s)
    on-board
    Sound Card
    on-board
    Monitor(s) Displays
    (s) is too ambitious for me
    Screen Resolution
    1920*1080
    Hard Drives
    Samsung SSD 860 EVO 250GB (SSD)
    Samsung MBG4GC 32GB (SSD)
    PSU
    I was very young when I last saw a PSU
    Case
    ...
    Cooling
    My coldness is enough to cool the computer
    Keyboard
    A broken and very clean keyboard
    Mouse
    Rat King
    Internet Speed
    Slowest internet connection in Europe
    Browser
    ChromePortable / TorBrowser
    Antivirus
    Biontech
    Other Info
    I can simply say that I took the red pill and I am not happy with it.

Slavic

Active member
Member
Local time
9:53 AM
Posts
186
Usually to (re)assign the default file types need to specify them in Settings: Apps > Default apps > Choose defaults by file type. You probably are interesting in *.txt files, so scroll down for .txt and change the default to your current Notepad: Look for another app on this PC. Maybe something doesn't work as I described?

 

My Computer

System One

  • Operating System
    Windows 11 Pro; Windows 8.1 Pro
    Computer type
    PC/Desktop
    CPU
    i7-12700K (Alder Lake)
    Motherboard
    Asus PRIME Z690-M Plus D4
    Memory
    16 GB (2x8 Corsair DDR4-2132)
    Graphics Card(s)
    Asus GeForce 1050 Ti, 4 GB
    Monitor(s) Displays
    Philips 235PQ
    Screen Resolution
    1920x1080
    Hard Drives
    Windows 11: Samsung SSD 870 EVO, 500 GB (SATA), MBR
    Windows 8.1: Samsung SSD 980 PRO, 500 GB (M.2), MBR
    PSU
    Platimax D.F. 1050 W (80 Plus Platinum)
    Internet Speed
    Local link 1 Gbps, provider's line 500 Mbps
    Browser
    Google Chrome
    Other Info
    Realtek PCIe GbE Family Controller (for Windows 8.1 compatibility)
    Microsoft Office H&S 2013 x64

Feuer

Fatal Error
Member
Thread Starter
Local time
9:53 AM
Posts
113
Location
Turkiye
@Slavic
Thanks for your reply

Choosing default application for txt files will not fix that.
OPEN function (ini, inf, txt, ps1) and EDIT function (vbs, bat) and also OPEN WITH MENU
 

My Computer

System One

  • Operating System
    Windows 11 21H2 Home Single Language
    Computer type
    Laptop
    Manufacturer/Model
    Hometech ALFA400C
    CPU
    I'm ashamed to talk about it...
    Motherboard
    There is no such a God, I only know mother-Earth
    Memory
    3GB :(
    Graphics Card(s)
    on-board
    Sound Card
    on-board
    Monitor(s) Displays
    (s) is too ambitious for me
    Screen Resolution
    1920*1080
    Hard Drives
    Samsung SSD 860 EVO 250GB (SSD)
    Samsung MBG4GC 32GB (SSD)
    PSU
    I was very young when I last saw a PSU
    Case
    ...
    Cooling
    My coldness is enough to cool the computer
    Keyboard
    A broken and very clean keyboard
    Mouse
    Rat King
    Internet Speed
    Slowest internet connection in Europe
    Browser
    ChromePortable / TorBrowser
    Antivirus
    Biontech
    Other Info
    I can simply say that I took the red pill and I am not happy with it.

swarfega

sʍɐɹɟǝƃɐ
Member
VIP
Local time
6:53 AM
Posts
413
Location
Cambridgeshire, UK
You can go to any txt file in file explorer right click and open with, then remember to add it.

They really have made choosing a default much worse.
 

My Computers

System One System Two

  • Operating System
    Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Self Built
    CPU
    Ryzen 9 3900x
    Motherboard
    Asus Strix x570-E
    Memory
    Corsair Dominator Platinum 32Gb@3600MHz
    Graphics Card(s)
    Asus Strix 3080 Ti OC
    Monitor(s) Displays
    Samsung Odyssey G7 32" Curved Gaming Monitor, IIYAMA XUB2792QSU-W1 27"
    Screen Resolution
    2560x1440@240Hz, 2560x1440@70Hz
    Hard Drives
    Samsung 980 Pro 1 Tb (OS), Samsung 970 Pro 1 Tb (games), Samsung 860 Evo 1Tb (data), Samsung 860 Evo 4 Tb (games), Crucial MX500 1Tb (photos), Synology DS920+ 32 Tb NAS.
    PSU
    Corsair RM850x
    Case
    Corsair Crystal 680x
    Cooling
    Corsair H100i Se Platinum, 8 Corsair QL120/140 fans
    Keyboard
    Corsair K70 RGB Mk 2 SE Rapid Fire
    Mouse
    Corsair M65 Elite
    Internet Speed
    58/12 Mbps
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender + Malwarebytes
    Other Info
    Astro a50 Headset, Samsung Galaxy Tab S3 Tablet.
    Creative T6300 5.1 Speakers. TPM 2.0 Module.
  • Operating System
    Arch Linux KDE
    Computer type
    PC/Desktop
    Manufacturer/Model
    Self Built
    CPU
    Ryzen 5600x
    Motherboard
    Asus Strix B550-E
    Memory
    Corsair Vengeance 32Gb@3200MHz
    Graphics card(s)
    Gigabyte RTX2070 Super Gaming OC
    Sound Card
    Creative Soundblaster AE-5
    Monitor(s) Displays
    Asus Strix XG43VQ 43" Ultrawide
    Screen Resolution
    3840x1200 @ 120Mhz
    Hard Drives
    Aorus Gen 4 NVMe 1 Tb (Windows Insider), Samsung 850 Pro 512Gb (data), Samsung 850 Evo 1Tb (backups), Samsung 860 Evo 2Tb (Home folder), Blu-ray player
    PSU
    Corsair RM750i
    Case
    Fractal Define R6
    Cooling
    Scythe Mugen 5 rev B and Corsair QL fans
    Mouse
    Glorious Model D
    Keyboard
    Corsair K70 RGB MK.2 Low Profile Rapidfire
    Internet Speed
    58/12 Mbps
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender + Malwarebytes
    Other Info
    Corsair Virtuoso Headset

Feuer

Fatal Error
Member
Thread Starter
Local time
9:53 AM
Posts
113
Location
Turkiye
I am looking for a regfix.
 

My Computer

System One

  • Operating System
    Windows 11 21H2 Home Single Language
    Computer type
    Laptop
    Manufacturer/Model
    Hometech ALFA400C
    CPU
    I'm ashamed to talk about it...
    Motherboard
    There is no such a God, I only know mother-Earth
    Memory
    3GB :(
    Graphics Card(s)
    on-board
    Sound Card
    on-board
    Monitor(s) Displays
    (s) is too ambitious for me
    Screen Resolution
    1920*1080
    Hard Drives
    Samsung SSD 860 EVO 250GB (SSD)
    Samsung MBG4GC 32GB (SSD)
    PSU
    I was very young when I last saw a PSU
    Case
    ...
    Cooling
    My coldness is enough to cool the computer
    Keyboard
    A broken and very clean keyboard
    Mouse
    Rat King
    Internet Speed
    Slowest internet connection in Europe
    Browser
    ChromePortable / TorBrowser
    Antivirus
    Biontech
    Other Info
    I can simply say that I took the red pill and I am not happy with it.

Try3

Well-known member
Member
VIP
Local time
6:53 AM
Posts
257
Location
The proper part of London
I am looking for a regfix.
Then I suggest you follow Swarfega's advice and combine it with
- making a system image beforehand, and
- taking Registry snapshots before & after.

One appropriate tool is
NirSoft RegistryChangesView
and another is
regshot - SourceForge.net
regshot - Discussion - SourceForge.net
How to Use Regshot To Monitor Your Registry - HTG

Then you'll know what the Registry changes are.
You'll then be able to restore the system image & test what you have just learnt.
- Testing will be essential because it might be that Registry changes alone will not achieve the change.

All the best,
Denis
 

My Computer

System One

  • Operating System
    Windows 11 Home x64 Version 21H2 Build 22000.194

Feuer

Fatal Error
Member
Thread Starter
Local time
9:53 AM
Posts
113
Location
Turkiye
@Try3

Thanks for reply.

For now, I am following the registry directly.

I searched in registry "edit" key and I have found some

so I
exported keys in regedit,
merged them with WinaeroTweaker
then convert it with them RegConvert

RegConvert


Code:
set notepad=D:\StupidFiles\CrackedApps\notepad.exe "%%1"


REG ADD "HKLM\SOFTWARE\Classes\batfile\shell\edit\command" /ve /t REG_EXPAND_SZ /d "%notepad%" /f
REG ADD "HKLM\SOFTWARE\Classes\cmdfile\shell\edit\command" /ve /t REG_EXPAND_SZ /d "%notepad%" /f
REG ADD "HKLM\SOFTWARE\Classes\regfile\shell\edit\command" /ve /t REG_EXPAND_SZ /d "%notepad%" /f
REG ADD "HKLM\SOFTWARE\Classes\VBEFile\Shell\Edit\Command" /ve /t REG_EXPAND_SZ /d "%notepad%" /f
REG ADD "HKLM\SOFTWARE\Classes\VBSFile\Shell\Edit\Command" /ve /t REG_EXPAND_SZ /d "%notepad%" /f
REG ADD "HKLM\SOFTWARE\Classes\WSFFile\Shell\Edit\Command" /ve /t REG_EXPAND_SZ /d "%notepad%" /f
REG ADD "HKLM\SOFTWARE\Classes\Windows.XamlDocument\shell\edit\command" /ve /t REG_EXPAND_SZ /d "%notepad%" /f
REG ADD "HKLM\SOFTWARE\Classes\Windows.Xbap\shell\edit\command" /ve /t REG_EXPAND_SZ /d "%notepad%" /f

now the EDIT command for these files associate with D:\StupidFiles\CrackedApps\notepad.exe

old entries %%SystemRoot%%\System32\NOTEPAD.EXE "%%1"

I have not new Text File in new context menu yet.
I have not working OPEN command for old associated files yet.
 

My Computer

System One

  • Operating System
    Windows 11 21H2 Home Single Language
    Computer type
    Laptop
    Manufacturer/Model
    Hometech ALFA400C
    CPU
    I'm ashamed to talk about it...
    Motherboard
    There is no such a God, I only know mother-Earth
    Memory
    3GB :(
    Graphics Card(s)
    on-board
    Sound Card
    on-board
    Monitor(s) Displays
    (s) is too ambitious for me
    Screen Resolution
    1920*1080
    Hard Drives
    Samsung SSD 860 EVO 250GB (SSD)
    Samsung MBG4GC 32GB (SSD)
    PSU
    I was very young when I last saw a PSU
    Case
    ...
    Cooling
    My coldness is enough to cool the computer
    Keyboard
    A broken and very clean keyboard
    Mouse
    Rat King
    Internet Speed
    Slowest internet connection in Europe
    Browser
    ChromePortable / TorBrowser
    Antivirus
    Biontech
    Other Info
    I can simply say that I took the red pill and I am not happy with it.

Melchior

Active member
VIP
Local time
1:53 AM
Posts
40
Location
NH, USA
I use a file types editor called [Types]
it seems to work ok on Windows 10 & 11 but was designed for Windows 7 and XP...

for editors I use Notepad 3 and Notepad++

both of these editor programs offer syntax highlighting.. :D
I have been using all three programs for over 10 years so they are safe. in case you ask.
 

My Computers

System One System Two

  • Operating System
    Windows 11 Pro (x64)(v21H2)(Build 22000.434)
    Computer type
    PC/Desktop
    Manufacturer/Model
    [Self-built](custom-build)(June 2020)
    CPU
    AMD Ryzen 9 3900X 12-Core
    Motherboard
    Asus PRIME X570-PRO (BIOS_r4021 [08/09/2021])
    Memory
    32GB, 2x G.Skill 16GB (PC3200)(DDR4-2137)
    Graphics Card(s)
    NVIDIA GeForce GTX 1070 Ti 8GB ACX model by EVGA
    Sound Card
    Realtek® ALC1220A 8-Channel High Definition Audio CODEC
    Monitor(s) Displays
    19" Dell Ultrasharp 1908FPBLK DVI used
    Screen Resolution
    1280x1024 (5:4 Aspect Ratio)
    Hard Drives
    1TB Samsug Evo 970 (NVMe)(SSD)
    2x 1TB Western Digital Black (SATA 3)(6Gb/s)(7200rpm)(5 year)

    #NVMe
    -- OS(Win10 Pro x64),
    -- programs,
    -- programming(IDEs & compilers),
    -- music,
    -- etc

    #2 ALL GAMES Installed here!
    #3 FILE Server!
    PSU
    Thermaltake TOUGHPOWER DPS G RGB Titanium Certified 1250Watt
    Case
    Corsair Graphite Series 780T Full Tower PC Case
    Cooling
    AMD Wraith cooler (stock) & 3x Corsair case fans
    Keyboard
    Sunbeam PS/2 standard keyboard
    Mouse
    Logitech B100
    Internet Speed
    800Mbps Download, 18Mbps Upload
    Browser
    Firefox & Waterfox
    Antivirus
    n/a aka "ABOVE TOP SECRET!" lol ;)
    Other Info
    My System is the ULTIMATE GAMING RIG ^_^
    TP-Link AC1750 Wireless Dual Band Gigabit Router,
    Model No. Archer C7 (v2)
    Motorola SB6190 Cable Modem
    Nvidia GFX Drivers: (v497.29)
    Realtek UAD Drivers: (v6.0.9282.1)
    Intel LAN Drivers: (v12.18.12.01)(2021-07-29)
  • Operating System
    Windows 10 Pro x64
    Computer type
    Laptop
    Manufacturer/Model
    DELL G15 Ryzen edition, model 5515
    CPU
    AMD Ryzen 7 5800H
    Motherboard
    DELL G15 Ryzen edition
    Memory
    16GB DDR4
    Graphics card(s)
    Ryzen 7 5800H integrated AMD Radeon Graphics and Nvidia GeForce 3060 6GB
    Sound Card
    Realtek ALC3254 with Nahimic 3D Audio for Gamers
    Monitor(s) Displays
    built-in
    Screen Resolution
    1920x1080
    Hard Drives
    512GB NVMe SSD
    PSU
    unkown
    Case
    laptop
    Mouse
    Logitech B100 USB
    Keyboard
    built-in
    Internet Speed
    400Mbps download, 10Mbps upload
    Browser
    Firefox & Waterfox Classic

Try3

Well-known member
Member
VIP
Local time
6:53 AM
Posts
257
Location
The proper part of London
I think you are saying that your results are based entirely on searching the Registry rather than observing changes in the Registry [when you change the association using Swarfega's suggestion].

Providing you have made a system image beforehand then you can test what you have worked out but it seems to me that only monitoring real Registry changes will lead to a reliable method.

- I notice that none of your Registry keys are for the txt file extension.
- Changing the file association will not alter the existence or otherwise of a New, Text document entry but merely which application launches txt files.
- Using a variable name that is also a name used for something else ["notepad"] can cause unexpected problems in scripts.
- I do not know why you are using "%%1" rather than "%1".
- - I thought you were using the first % as an 'escape character' until your sentence old entries %%SystemRoot%%\System32\NOTEPAD.EXE "%%1" and I have just checked an existing Reg Add … batch file of my own that writes %1 and I did not need to use any escape character to make it work.
- - I cannot get to my Win11 test computer at the moment but my Windows 10 computer has "%1" in its regfile Registry key [the only one I have just checked but which does match other Registry keys I have worked on in the past].

Best of luck,
Denis
 
Last edited:

My Computer

System One

  • Operating System
    Windows 11 Home x64 Version 21H2 Build 22000.194

Feuer

Fatal Error
Member
Thread Starter
Local time
9:53 AM
Posts
113
Location
Turkiye
That @Try3 mentioned; If you are playing with the registry, you should take a system image backup or registry backup. ****IMPORTANT****
I have a backup procedure

%%1 to use in batch file, it is in %1 in registry data (escape character)

yes i can change %notepad% to %textedit%, maybe need to change notepad.exe to textedit or something too.

I uninstalled both uwp notepad app and capability notepad, i have not OPEN keys for .txt and other files, ı will share after I figured out.

@Melchior

Thanks for replying
I have DefaultProgramsEditor but I want to make it via registry with a bat file.

 

My Computer

System One

  • Operating System
    Windows 11 21H2 Home Single Language
    Computer type
    Laptop
    Manufacturer/Model
    Hometech ALFA400C
    CPU
    I'm ashamed to talk about it...
    Motherboard
    There is no such a God, I only know mother-Earth
    Memory
    3GB :(
    Graphics Card(s)
    on-board
    Sound Card
    on-board
    Monitor(s) Displays
    (s) is too ambitious for me
    Screen Resolution
    1920*1080
    Hard Drives
    Samsung SSD 860 EVO 250GB (SSD)
    Samsung MBG4GC 32GB (SSD)
    PSU
    I was very young when I last saw a PSU
    Case
    ...
    Cooling
    My coldness is enough to cool the computer
    Keyboard
    A broken and very clean keyboard
    Mouse
    Rat King
    Internet Speed
    Slowest internet connection in Europe
    Browser
    ChromePortable / TorBrowser
    Antivirus
    Biontech
    Other Info
    I can simply say that I took the red pill and I am not happy with it.

Try3

Well-known member
Member
VIP
Local time
6:53 AM
Posts
257
Location
The proper part of London
It was your line
old entries %%SystemRoot%%\System32\NOTEPAD.EXE "%%1"
that threw me. I thought you were saying that your current entry was
%%SystemRoot%%\System32\NOTEPAD.EXE "%%1"

In the [only] equivalent batch file of my own that I checked, I did not need any escape character in the Reg Add … "%1" command.
I have rechecked my batch file and it was not what it seemed on first re-reading so I would also use an escape character if I was doing what you are doing.

Escape Characters - RobvdW
Quotes, Escape Characters, Delimiters - SS64

Oh, purely out of interest, when you referred to RegConvert did you mean Sordums' utility Reg converter?

Denis
 
Last edited:

My Computer

System One

  • Operating System
    Windows 11 Home x64 Version 21H2 Build 22000.194

Feuer

Fatal Error
Member
Thread Starter
Local time
9:53 AM
Posts
113
Location
Turkiye
Yes Sordum.org's Reg Converter v1.2

in batch file it is %% , when i run it it seems % in registry

I did not tried it with 1% :)

set notepad=D:\StupidFiles\CrackedApps\notepad.exe "%%1"

if you want to turn it back to default

set notepad=%%SystemRoot%%\System32\NOTEPAD.EXE "%%1"

after you run batch [%%SystemRoot%% in batch file] you have %SystemRoot% in registry
 

My Computer

System One

  • Operating System
    Windows 11 21H2 Home Single Language
    Computer type
    Laptop
    Manufacturer/Model
    Hometech ALFA400C
    CPU
    I'm ashamed to talk about it...
    Motherboard
    There is no such a God, I only know mother-Earth
    Memory
    3GB :(
    Graphics Card(s)
    on-board
    Sound Card
    on-board
    Monitor(s) Displays
    (s) is too ambitious for me
    Screen Resolution
    1920*1080
    Hard Drives
    Samsung SSD 860 EVO 250GB (SSD)
    Samsung MBG4GC 32GB (SSD)
    PSU
    I was very young when I last saw a PSU
    Case
    ...
    Cooling
    My coldness is enough to cool the computer
    Keyboard
    A broken and very clean keyboard
    Mouse
    Rat King
    Internet Speed
    Slowest internet connection in Europe
    Browser
    ChromePortable / TorBrowser
    Antivirus
    Biontech
    Other Info
    I can simply say that I took the red pill and I am not happy with it.

Feuer

Fatal Error
Member
Thread Starter
Local time
9:53 AM
Posts
113
Location
Turkiye
I made the script
I have used that default FileType templates (But I edited them, converted to the .bat file)

ATTENTION
If you will use this script, make a backup of your registry first.
You will loose some of context menu options (like print).
It is your own risk to use it.


Code:
set notepad=d:\StupidFiles\CrackedApps\notepad.exe "%%1"

:: [.txt]
REG DELETE "HKCR\.txt" /f
REG ADD "HKCR\.txt" /ve /t REG_SZ /d "txtfile" /f
REG ADD "HKCR\.txt" /v "Content Type" /t REG_SZ /d "text/plain" /f
REG ADD "HKCR\.txt" /v "PerceivedType" /t REG_SZ /d "text" /f
REG ADD "HKCR\.txt\PersistentHandler" /ve /t REG_SZ /d "{5e941d80-bf96-11cd-b579-08002b30bfeb}" /f
REG ADD "HKCR\.txt\ShellNew" /v "ItemName" /t REG_EXPAND_SZ /d "@%notepad%,-470" /f
REG ADD "HKCR\.txt\ShellNew" /v "NullFile" /t REG_SZ /d "" /f
REG DELETE "HKCR\SystemFileAssociations\.txt" /f
REG ADD "HKCR\SystemFileAssociations\.txt" /v "PerceivedType" /t REG_SZ /d "document" /f
REG DELETE "HKCR\txtfile" /f
REG ADD "HKCR\txtfile" /ve /t REG_SZ /d "Text Document" /f
REG ADD "HKCR\txtfile" /v "EditFlags" /t REG_DWORD /d "2162688" /f
REG ADD "HKCR\txtfile" /v "FriendlyTypeName" /t REG_EXPAND_SZ /d "@%notepad%,-469" /f
REG ADD "HKCR\txtfile\DefaultIcon" /ve /t REG_EXPAND_SZ /d "%%SystemRoot%%\system32\imageres.dll,-102" /f
REG ADD "HKCR\txtfile\shell\open\command" /ve /t REG_EXPAND_SZ /d "%notepad%" /f
REG DELETE "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt" /f
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt\OpenWithList" /f
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt\OpenWithProgids" /v "txtfile" /t REG_NONE /d "" /f
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt\UserChoice" /v "Hash" /t REG_SZ /d "hyXk/CpboWw=" /f
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt\UserChoice" /v "ProgId" /t REG_SZ /d "txtfile" /f
REG DELETE "HKCU\SOFTWARE\Microsoft\Windows\Roaming\OpenWith\FileExts\.txt" /f
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\Roaming\OpenWith\FileExts\.txt\UserChoice" /v "Hash" /t REG_SZ /d "FvJcqeZpmOE=" /f
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\Roaming\OpenWith\FileExts\.txt\UserChoice" /v "ProgId" /t REG_SZ /d "txtfile" /f

:: [.log]
REG DELETE "HKCR\.log" /f
REG ADD "HKCR\.log" /ve /t REG_SZ /d "txtfile" /f
REG DELETE "HKCR\SystemFileAssociations\.log" /f

:: [.inf]
REG DELETE "HKCR\inffile" /f
REG ADD "HKCR\inffile" /ve /t REG_SZ /d "Setup Information" /f
REG ADD "HKCR\inffile" /v "FriendlyTypeName" /t REG_EXPAND_SZ /d "@%%SystemRoot%%\System32\setupapi.dll,-2000" /f
REG ADD "HKCR\inffile\DefaultIcon" /ve /t REG_EXPAND_SZ /d "%%SystemRoot%%\System32\imageres.dll,-69" /f
REG ADD "HKCR\inffile\shell\Install" /ve /t REG_SZ /d "&Install" /f
REG ADD "HKCR\inffile\shell\Install" /v "MUIVerb" /t REG_EXPAND_SZ /d "@%%SystemRoot%%\System32\setupapi.dll,-2002" /f
REG ADD "HKCR\inffile\shell\Install\command" /ve /t REG_EXPAND_SZ /d "%%SystemRoot%%\System32\InfDefaultInstall.exe \"%%1\"" /f
REG ADD "HKCR\inffile\shell\open\command" /ve /t REG_EXPAND_SZ /d "%notepad%" /f
REG DELETE "HKCR\SystemFileAssociations\.inf" /f
REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.inf" /f
REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Roaming\OpenWith\FileExts\.inf" /f

:: [.ini]
REG DELETE "HKCR\.ini" /f
REG ADD "HKCR\.ini" /ve /t REG_SZ /d "inifile" /f
REG ADD "HKCR\.ini" /v "PerceivedType" /t REG_SZ /d "text" /f
REG ADD "HKCR\.ini\PersistentHandler" /ve /t REG_SZ /d "{5e941d80-bf96-11cd-b579-08002b30bfeb}" /f
REG DELETE "HKCR\inifile" /f
REG ADD "HKCR\inifile" /ve /t REG_SZ /d "Configuration Settings" /f
REG ADD "HKCR\inifile" /v "EditFlags" /t REG_DWORD /d "2097152" /f
REG ADD "HKCR\inifile" /v "FriendlyTypeName" /t REG_SZ /d "@shell32.dll,-10151" /f
REG ADD "HKCR\inifile\DefaultIcon" /ve /t REG_EXPAND_SZ /d "%%SystemRoot%%\system32\imageres.dll,-69" /f
REG ADD "HKCR\inifile\shell\open\command" /ve /t REG_EXPAND_SZ /d "%notepad%" /f
REG DELETE "HKCR\SystemFileAssociations\.ini" /f
REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.ini" /f
REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Roaming\OpenWith\FileExts\.ini" /f

:: [.ps1]
REG DELETE "HKCR\.ps1" /f
REG ADD "HKCR\.ps1" /ve /t REG_SZ /d "Microsoft.PowerShellScript.1" /f
REG ADD "HKCR\.ps1\ShellNew" /v "NullFile" /t REG_SZ /d "" /f
REG DELETE "HKCR\Microsoft.PowerShellScript.1" /f
REG ADD "HKCR\Microsoft.PowerShellScript.1" /v "EditFlags" /t REG_DWORD /d "131072" /f
REG ADD "HKCR\Microsoft.PowerShellScript.1" /v "FriendlyTypeName" /t REG_EXPAND_SZ /d "@\"%%systemroot%%\system32\windowspowershell\v1.0\powershell.exe\",-103" /f
REG ADD "HKCR\Microsoft.PowerShellScript.1\DefaultIcon" /ve /t REG_SZ /d "\"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe\",0" /f
REG ADD "HKCR\Microsoft.PowerShellScript.1\Shell" /ve /t REG_SZ /d "Open" /f
REG ADD "HKCR\Microsoft.PowerShellScript.1\Shell\0" /v "MUIVerb" /t REG_EXPAND_SZ /d "@\"%%systemroot%%\system32\windowspowershell\v1.0\powershell.exe \",-108" /f
REG ADD "HKCR\Microsoft.PowerShellScript.1\Shell\0\Command" /ve /t REG_SZ /d "\"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe\" \"-Command\" \"if((Get-ExecutionPolicy ) -ne 'AllSigned') { Set-ExecutionPolicy -Scope Process Bypass }; & '%%1'\"" /f
REG ADD "HKCR\Microsoft.PowerShellScript.1\Shell\Open\Command" /ve /t REG_EXPAND_SZ /d "%notepad%" /f
REG DELETE "HKCR\SystemFileAssociations\.ps1" /f
REG DELETE "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.ps1" /f
REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Roaming\OpenWith\FileExts\.ps1" /f

:: [EXTRAS; .conf, .srt, .sub]
REG ADD "HKCR\.conf" /ve /t REG_SZ /d "txtfile" /f
REG ADD "HKCR\.srt" /ve /t REG_SZ /d "txtfile" /f
REG ADD "HKCR\.sub" /ve /t REG_SZ /d "txtfile" /f

:: [EDIT; .bat, .cmd, .js, .jse, .reg, .vbe, .vbs, .wsf, xaml, xbap]
REG ADD "HKLM\SOFTWARE\Classes\batfile\shell\edit\command" /ve /t REG_EXPAND_SZ /d "%notepad%" /f
REG ADD "HKLM\SOFTWARE\Classes\cmdfile\shell\edit\command" /ve /t REG_EXPAND_SZ /d "%notepad%" /f
REG ADD "HKLM\SOFTWARE\Classes\JSEFile\Shell\Edit\Command" /ve /t REG_EXPAND_SZ /d "%notepad%" /f
REG ADD "HKLM\SOFTWARE\Classes\JSFile\Shell\Edit\Command" /ve /t REG_EXPAND_SZ /d "%notepad%" /f
REG ADD "HKLM\SOFTWARE\Classes\regfile\shell\edit\command" /ve /t REG_EXPAND_SZ /d "%notepad%" /f
REG ADD "HKLM\SOFTWARE\Classes\VBEFile\Shell\Edit\Command" /ve /t REG_EXPAND_SZ /d "%notepad%" /f
REG ADD "HKLM\SOFTWARE\Classes\VBSFile\Shell\Edit\Command" /ve /t REG_EXPAND_SZ /d "%notepad%" /f
REG ADD "HKLM\SOFTWARE\Classes\WSFFile\Shell\Edit\Command" /ve /t REG_EXPAND_SZ /d "%notepad%" /f
REG ADD "HKLM\SOFTWARE\Classes\Windows.XamlDocument\shell\edit\command" /ve /t REG_EXPAND_SZ /d "%notepad%" /f
REG ADD "HKLM\SOFTWARE\Classes\Windows.Xbap\shell\edit\command" /ve /t REG_EXPAND_SZ /d "%notepad%" /f

I have NEW context menu for [.ps1 and .txt] back
I have OPEN option for [.txt, .ini, .inf, .log, .ps1]
EXTRA open option for [.conf, .srt, .sub]
I have EDIT option for [bat, .cmd, .js, .jse, .reg, .vbe, .vbs, .wsf, xaml, xbap]
I save "run script" option for .ps1, "install" option for .inf
I removed Print option for related file types.
I changed New Powershell Script's icon because I also uninstalled powershell_ise.

Thanks Slavic , Try3 , Melchior , swarfega for your interesting and replies.
 
Last edited:

My Computer

System One

  • Operating System
    Windows 11 21H2 Home Single Language
    Computer type
    Laptop
    Manufacturer/Model
    Hometech ALFA400C
    CPU
    I'm ashamed to talk about it...
    Motherboard
    There is no such a God, I only know mother-Earth
    Memory
    3GB :(
    Graphics Card(s)
    on-board
    Sound Card
    on-board
    Monitor(s) Displays
    (s) is too ambitious for me
    Screen Resolution
    1920*1080
    Hard Drives
    Samsung SSD 860 EVO 250GB (SSD)
    Samsung MBG4GC 32GB (SSD)
    PSU
    I was very young when I last saw a PSU
    Case
    ...
    Cooling
    My coldness is enough to cool the computer
    Keyboard
    A broken and very clean keyboard
    Mouse
    Rat King
    Internet Speed
    Slowest internet connection in Europe
    Browser
    ChromePortable / TorBrowser
    Antivirus
    Biontech
    Other Info
    I can simply say that I took the red pill and I am not happy with it.
Top Bottom