Context Menu for url files

ur00361883

New member
Local time
11:01 AM
Messages
1
I wrote a code to delete a file.

But when I am trying to delete a shortcut, it it deleting target file instead of shortcut when I created a context menu entry for this executable.

The executable is working fine if we use it normally instead of context menu.But with COntext menu it is taking the target instead of shortcut.

The context menu I added for files is by using below registry

Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\Delete Permanently\command]
@="\"C:\\Program Files\\Permanent Delete\\Delete Permanently.exe\" \"%1\""

And I solved the problem for Shortcut files adding below registry also.

Code:
[HKEY_CLASSES_ROOT\lnkfile\shell\Delete Permanently\command]
@="\"C:\\Program Files\\Permanent Delete\\Delete Permanently.exe\" \"%1\""

I got a different issue now and the context menu is not coming for .url files. I tried the similar approach used for lnkfile and tried in hive InternetShortcut but even with system user rights also I am not able to add registries to this hive.

Code:
HKEY_CLASSES_ROOT\InternetShortcut\shell

Please help me on this.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
HP
OS
Windows 7 Ultimate x64
CPU
HP
Motherboard
HP
Memory
8
Browser
chrome

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Back
Top