To invoke the equivalent special Explorer-specific menu item via command-line API call, you can use the shell command in Windows. However, it's important to note that this method requires the exact command for the desired menu item.
Here's a basic example of how to use the shell command:
shell:AppsFolder
This command will open the Apps folder in File Explorer.
To find the exact command for a specific menu item, you can use a tool like AutoHotkey or PowerShell to automate the process of finding the command. Here's an example using AutoHotkey:
Send, #{F4}
Sleep, 100
Send, shell:AppsFolder
Sleep, 100
Send, {Enter}
This script will simulate pressing the Alt + F4 keys, wait a bit, then type the command to open the Apps folder, and finally press Enter. You can modify the script to simulate the keystrokes for your desired menu item.
Remember, this method is not a workaround via taskkill, but a direct way to invoke the menu item using the command-line API. The exact command for each menu item may vary, so you might need to research or experiment to find the correct command for your specific use case.
References: