Decimation / SmartImage

Reverse image search tool (SauceNao, IQDB, Ascii2D, trace.moe, and more)
GNU General Public License v3.0
583 stars 28 forks source link

SmartImage not opening from context menu #2

Closed Xanawatt closed 4 years ago

Xanawatt commented 4 years ago

Hi, I placed the executable in my system %PATH% location (C:) and then ran the command as administrator to add the context menu (SmartImage --ctx-menu). When I try to right click a file and click the SmartImage option, it just opens the default "How would you like to open this file" window. Is there a step I am missing? Did I place the executable in the right location?

Decimation commented 4 years ago

I'm aware of this issue. I'm trying to figure this out.

Decimation commented 4 years ago

This has been fixed in the most recent version. I had accidentally used my personal executable path in the registry command. It should work now!

Xanawatt commented 4 years ago

I get this error when running "SmartImage --ctx-menu" now:

Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'path1') at System.IO.Path.Combine(String path1, String path2) at SmartImage.Config.GetExecutableLocation() at SmartImage.Config.CreateBatchFile() at SmartImage.Config.AddToContextMenu() at SmartImage.Cli.<>c.<.cctor>b__20_3(String[] args) at SmartImage.Program.Main(String[] args)

Decimation commented 4 years ago

Try the latest version.

Xanawatt commented 4 years ago

Alright, I get this now when I run the same thing:

× Could not locate SmartImage.exe in system path. Unhandled exception. System.InvalidOperationException: Operation is not valid due to the current state of the object. at SmartImage.Config.GetExecutableLocation() at SmartImage.Config.AddToContextMenu() at SmartImage.Cli.<>c.<.cctor>b__20_3(String[] args) at SmartImage.Program.Main(String[] args)

Decimation commented 4 years ago

C: is not included in the system %PATH% by default. %PATH% is an environment variable in Windows (I'm not sure if you know how environment variables work, but you can read about them here).

I was planning on simplifying things by automatically adding the program's current directory to %PATH% eventually so users don't have to mess with it (it's not very user-friendly). I'll update it with this feature shortly.

Xanawatt commented 4 years ago

Ohhh, that makes sense. Now that I have done that, it works perfectly now!

Decimation commented 4 years ago

Great! Thanks for using SmartImage!