SnagitEditor Custom Context Menu for .jpg/,png Files - Issue

  • 1
  • Question
  • Updated 1 year ago
I created a custom context menu for both .jpg and .png files and it works flawlessly. So essentially, when I right click these extension I get an option "Edit with SnagitEditor" like in the picture below:



The command line I used is:
C:\Program Files\TechSmith\Snagit 2018\SnagitEditor.exe C:\ABC.JPG
where C:\ABC.JPG is the name & path of the file passed via the context menu.

The issue is that it works perfectly and after editing I will close the file from the library as well. But when I open the SnagitEditor via the shortcut in startmenu/desktop or via the path "C:\Program Files\TechSmith\Snagit 2018\SnagitEditor.exe" it will always open the last file that I passed through the context menu. If i delete the file then I will get a popup error but it will no matter what try to open the last file passed.

Is the command line wrong ? Or is it some other issue.

How to re-produce the issue:
C:\Program Files\TechSmith\Snagit 2018\SnagitEditor.exe [Filepath & Filename HERE]
Run this via cmd and properly close the picture from library etc but when you open it via shortcut on desktop/startmenu it will open it again. 


One weird thing I found is that if you right click Snagit and open Snagit Editor then it won't show the image but any other shortcut will show it.

Any help will be appreciated!
Photo of UWK-87

UWK-87

  • 17 Posts
  • 3 Reply Likes

Posted 1 year ago

  • 1
Photo of Dubie

Dubie

  • 961 Posts
  • 741 Reply Likes
First off don't see why you would need this as Snagit Editor should be in the right-click context menu "Open With"
but if you must than the best way to create it that I know of is with the registry editor (regedit).

I would also just make it open all file types. Then you don't need multiple shortcuts in the menu.
The one shortcut will work for any file formats that Snagit can open.

**NOTE: Backup the registry. Due at your own risk. I am not responsible for damages that may arise from your editing of the registry.

The HKEY_CLASSES_ROOT\*\shell key has the options that appear when you right-click any type of file.

Navigate to the *\shell key

Click Images to enlarge


1. First, right-click the Shell key and create a new key. Name the key what you want the option to be in the menu.

2. Next, right-click the key you just created and create a new subkey under it. Name the new key “command” (without the quotes)



Next Double-click the “(Default)” value in the command key and enter the path to the .exe file in the following format:

"C:\\Program Files\\TechSmith\\Snagit 2018\\SnagitEditor.exe" %1

** Be sure to use the double backslashes and end the path with %1.
The %1 sends the selected file name to the program.



The option should now be in the menu.



:)
(Edited)
Photo of UWK-87

UWK-87

  • 17 Posts
  • 3 Reply Likes
Hi Dubie,

Thank you so much for going through the trouble of compiling this and its absolutely correct. However, I do apologize for not making my issue clear.

The issue is:

It works perfectly and after editing I will close the file from the library as well. But when I open the SnagitEditor via the shortcut in startmenu/desktop or via the path "C:\Program Files\TechSmith\Snagit 2018\SnagitEditor.exe" it will always open the last file that I passed through the context menu. If i delete the file then I will get a popup error. But no matter what it will always try to open the last file passed via %1 argument even when NOT using the context menu. How can I rectify this?

Thank you again and sorry for the trouble.
Photo of Dubie

Dubie

  • 961 Posts
  • 741 Reply Likes
I suspect this is just how Snagit is coded.
I too had varying results using the shortcut I created with the method above.
I have done this with other programs and had no issues.

I just deleted the shortcut and see no reason for me personally to pursue it any farther
because the shortcut that Snagit itself creates under the "Open With" menu works without flaw and have no need to add to the length of options in the context menu.




Sorry I don't have more to offer but best of luck to your pursuit.

:)
Photo of UWK-87

UWK-87

  • 17 Posts
  • 3 Reply Likes
Just wanted to update here. Reported it as a bug and got accepted as a bug. Let's hope they fix it soon !

Bug:
The issue is when you right click any jpeg/png file and click on open with -> Snagit Editor, it works perfectly. So later when you open the SnagitEditor via the shortcut in start menu/desktop or via the path "C:\Program Files\TechSmith\Snagit 2018\SnagitEditor.exe" (anyway you want) it will always open the last file that you opened through the context menu. If i delete the file then I will get a popup error. But no matter what it will always try to open the last file passed via context menu even when NOT using the context menu.