View Single Post
Old 9th October 2019, 01:53   #10  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
You are welcome. What is the same topic is sometimes you want to delete context menu items that are defined in the Registry either by Windows or by an installed app. While it can be perfectly achieved with regedit it makes sense to do it with a powershell script. It's a relative easy task that is well suited to practice powershell. An example would be deleting the 'Edit with Paint 3D' menu item that is defined for jpg files. This can be achieved in one line:

Remove-Item "HKLM:\SOFTWARE\Classes\SystemFileAssociations\.jpg\Shell\3D Edit" -Force -Recurse

Saved in a powershell script (*.ps1) it can be executed every time Windows was installed. By default, ps1 files are opened with Visual Studio Code on my system, I find that the easiest way to execute a powershell script is using Open with++, for that I defined a menu command:

Name: Execute
File Types: ps1
Path: powershell
Arguments: -nologo -noexit -file %paths%

Also related is editing the New Menu, for that I coded a simple GUI app. This app is based on a brand-new and exciting platform called .NET Core 3.0, it is the successor of the .NET Framework, a brand that was discontinued in favor of the Core brand. Downside for users is that it's not yet part of the OS, but it will be in the future.

https://github.com/stax76/ShellNew
stax76 is offline   Reply With Quote