-
-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Open with" option on context menu #612
Comments
https://github.com/RubicBG/Nilesoft-Shell-Snippets/blob/main/ex1.system/all.openwith.simple.ml.nss |
I've already tried (twice) to recreate the "Open with" menu with NS syntax, but without success - I manage to match the information which extension should be opened with which programs, but I can't get them to open the file always (80% of the time) But there is a solution: by modifying the registry to create a second "Open with" menu that will not respect anything other than the extension. This method only works in Win 11 (I've never tried it on another OS version, but I'm 99% sure it won't work).
|
Thank you very much |
menu(title='make variables local' type='*' expanded='true') {
$rf = null
$rt = null
$re = null
$reg_modify = 'reg query "HKEY_CLASSES_ROOT\@re\shell\@rt" >nul 2>&1 && reg delete "HKEY_CLASSES_ROOT\@re\shell\@rt" /f || reg copy "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\@rf" "HKEY_CLASSES_ROOT\@re\shell\@rt" /f'
$rkey='NewOpenWith'
$isCheck=reg.exists('HKCR\*\shell\@rkey') and reg.exists('HKCR\Directory\shell\@rkey') and reg.exists('HKCR\Drive\shell\@rkey')
item(title='Open With' checked=isCheck tip='Add "Open With" to all files, folders, and drives'
admin cmd-line='/c @{rf='Windows.OpenWith' rt=rkey } @{re='*'} @reg_modify & @{re='Directory'} @reg_modify & @{re='Drive'} @reg_modify' window='hidden')
}
remove(where=this.title==str.res('shell32.dll', -5376) or this.title==str.res('shell32.dll', -5377))
modify(where=this.title==title.open and this.pos>0 image=icon.open_with title=title.open_with+"\t"+'modern') try it and write back |
I have been trying to find documentation on adding an "Open with" option to the context menu, but I can't seem to find anything on this, is it possible to do so with Shell? If so, would it also be possible to make it so that the "Open with" options all relate to the file extension of the file that's being opened?
Thank you
The text was updated successfully, but these errors were encountered: