Skip to content
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

Exiftool not found #110

Closed
rmharold opened this issue Feb 14, 2021 · 24 comments
Closed

Exiftool not found #110

rmharold opened this issue Feb 14, 2021 · 24 comments
Labels
bug Something isn't working Fixed

Comments

@rmharold
Copy link

When I try to run jexiftoolgui I get an error that says the exiftool specified in preferences cannot be found. I cannot change the preferences. What should I do?

@hvdwolf
Copy link
Owner

hvdwolf commented Feb 15, 2021

Which OS are you using? Where did you download exiftool and where did you install it?
Are you on windows and did you not rename "exiftool-k.exe" to "exiftool.exe"? As described on the Releases page where you downloaded JTG.

@philpav
Copy link

philpav commented Apr 4, 2021

I'm having the same problem on Windows 10.

I have downloaded jExifToolGUI-1.8.1.0-win-x86_64_with-jre.zip and unzipped it. I exiftool.exe in the same folder and also under C:\Windows\System32

Here is the log file:

#logback.classic pattern: %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 11:48:32.879 [main] INFO org.hvdw.jexiftoolgui.Application - Start application 11:48:32.879 [main] INFO org.hvdw.jexiftoolgui.Application - Continuing in system language or, if not translated, in English 11:48:33.910 [AWT-EventQueue-0] INFO org.hvdw.jexiftoolgui.mainScreen - string for DB: C:\Users\PhilippXPS\jexiftoolgui_data\jexiftoolgui.db 11:48:35.558 [AWT-EventQueue-0] INFO org.hvdw.jexiftoolgui.Utils - preference exiftool returned: null 11:48:35.664 [AWT-EventQueue-0] INFO org.hvdw.jexiftoolgui.Utils - exiftool_found mentions: true 11:48:35.758 [AWT-EventQueue-0] ERROR o.h.j.controllers.UpdateActions - Successfully did: creating the table userFavorites (1.4) 11:48:35.758 [AWT-EventQueue-0] ERROR o.h.j.controllers.UpdateActions - Successfully did: drop table CustomView 11:48:35.758 [AWT-EventQueue-0] ERROR o.h.j.controllers.UpdateActions - Successfully did: drop table CustomViewLines 11:48:35.758 [AWT-EventQueue-0] ERROR o.h.j.controllers.UpdateActions - Successfully did: drop table CustomEdit 11:48:35.774 [AWT-EventQueue-0] ERROR o.h.j.controllers.UpdateActions - Successfully did: drop table CustomEditLines 11:48:35.774 [AWT-EventQueue-0] ERROR o.h.j.controllers.UpdateActions - Successfully did: creating the table CustomMetadataset (1.6) 11:48:35.774 [AWT-EventQueue-0] ERROR o.h.j.controllers.UpdateActions - Successfully did: creating the table CustomMetadatasetLines (1.6) 11:48:35.867 [AWT-EventQueue-0] INFO org.hvdw.jexiftoolgui.mainScreen - OS name MICROSOFT 11:48:35.867 [AWT-EventQueue-0] ERROR o.h.j.controllers.CommandRunner - IOException error java.io.IOException: Cannot run program "C:/jExifToolGUI/exiftool.exeC:/Windows/System32/exiftool.exeC:/Windows/exiftool.exe": CreateProcess error=2, Das System kann die angegebene Datei nicht finden at java.base/java.lang.ProcessBuilder.start(Unknown Source) at java.base/java.lang.ProcessBuilder.start(Unknown Source) at org.hvdw.jexiftoolgui.controllers.CommandRunner.runCommand(CommandRunner.java:27) at org.hvdw.jexiftoolgui.mainScreen.setProgramScreenTexts(mainScreen.java:3545) at org.hvdw.jexiftoolgui.mainScreen.<init>(mainScreen.java:3679) at org.hvdw.jexiftoolgui.mainScreen.createAndShowGUI(mainScreen.java:3725) at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.run(Unknown Source) Caused by: java.io.IOException: CreateProcess error=2, Das System kann die angegebene Datei nicht finden at java.base/java.lang.ProcessImpl.create(Native Method) at java.base/java.lang.ProcessImpl.<init>(Unknown Source) at java.base/java.lang.ProcessImpl.start(Unknown Source) ... 19 common frames omitted

@hvdwolf
Copy link
Owner

hvdwolf commented Apr 4, 2021

Hi,

The logs mention "C:/jExifToolGUI/exiftool.exeC:/Windows/System32/exiftool.exeC:/Windows/exiftool.exe"

So inside C:\jExifToolGUI, you have also exiftool.exe OR do you have exiftool-k.exe?
If you have exiftool-k.exe, rename it to exiftool.exe

@philpav
Copy link

philpav commented Apr 4, 2021

Hi,

I have exiftool.exe and also exiftool-k.exe. It makes no difference.

2021-04-04 20_59_11-jExifToolGUI

@cpo-ux
Copy link

cpo-ux commented Apr 4, 2021

I'm having the same problem on Windows 10. I have the latest exiftool (12.23) downloaded from exiftool.org. I renamed the file from exiftool(-k).exe to exiftool.exe and put in C:\Windows directory, as instructions say at https://exiftool.org/install.html When I run jExifToolGUI.exe in jExifToolGUI-1.8.1.0-win-x86_64_with-jre folder or run jExifToolGUI.jar I get the same dialog box saying "The Exiftool specified in your preferences does not exist. Did you move/rename/delete it?" and the GUI never opens. It would be nice if the GUI would open and then I could see what my preferences are. I've never been able to get jExifToolGUI to work. Thanks for any help you may have :)

@geitda
Copy link

geitda commented Apr 15, 2021

Same problem here with Windows 10. I have exiftool installed through Strawberry Perl (and on the PATH), such that exiftool -ver prints 12.16 but I get java.io.IOException: Cannot run program "C:/Strawberry/perl/site/bin/exiftoolC:/Strawberry/perl/site/bin/exiftool.bat": CreateProcess error=2, The system cannot find the file specified So it's finding something, but weirdly duplicating the executable path. To be clear, both of these files exist (C:/Strawberry/perl/site/bin/exiftool AND C:/Strawberry/perl/site/bin/exiftool.bat), so is it finding all matches on the path? philpav's log shows not two but three of these, all mushed together.

@hvdwolf
Copy link
Owner

hvdwolf commented Apr 30, 2021

Another user just reported a bug in #116.
Can it be that exiftool.exe is in a path containing spaces?
If so then that is indeed a bug.

@cpo-ux
Copy link

cpo-ux commented Apr 30, 2021

Another user just reported a bug in #116.
Can it be that exiftool.exe is in a path containing spaces?
If so then that is indeed a bug.

As I said in my post above, exiftool.exe is in the Windows directory, in other words, path C:\Windows in which there are no spaces.

How do I edit the preferences for jExifToolGUI.exe (to specify path for exiftool.exe)?

@hvdwolf
Copy link
Owner

hvdwolf commented Apr 30, 2021

"How do I edit the preferences for jExifToolGUI.exe (to specify path for exiftool.exe)?"

What do you mean? manually, outside JTG?
outside you find them in windows in the registry.
HKEY_CURRENT_USER\SOFTWARE\JavaSoft\Prefs\org\hvdw\jexiftoolgui

@cpo-ux
Copy link

cpo-ux commented Apr 30, 2021

The only way that I could get jexiftoolgui to work is to change the registry entry mentioned above and to run as an administrator in Windows. Will not work as a standard user, needs administrator privileges apparently.

The registry key change I did in order to make it work was the following:

Computer\HKEY_CURRENT_USER\SOFTWARE\JavaSoft\Prefs\org\hvdw\jexiftoolgui
Value name:
exiftool
Value data:
/C:///Windows//exiftool.exe

This works when running jExifToolGUI.exe as admin. Running as standard user, it reports:
Exiftool preference incorrect: The Exiftool specified in your preferences does not exist. Did you move/rename/delete it?

@hvdwolf hvdwolf added the wontfix This will not be worked on label May 1, 2021
@hvdwolf
Copy link
Owner

hvdwolf commented May 1, 2021

It is good that you mention this admin requirement, because now I understand what is going wrong. This is nothing in exiftool or JTG. This is a security setting of windows. If Windows requires admin rights "to do something", it means Windows considers this as a "dangerous" action requiring and admin to do this. I guess this is due to the fact that my app does not come from the Windows store and is therefore not registered as "safe" and can therefore not start an exe from c:\windows.

The fact that exiftool.org describes to copy exiftool into c:\windows is that Phil Harvey assumes you use exiftool as is. And to copy it into c:\windows will copy it into the path. (and by the way: this is against microsoft guidelines)
I can't change this as it would require me to go through the Micosoft Store to register, and I don't want that, OR it would require admin rights for JTG to change this on installation. I don't want to do that either because I don't want an install app and I don't want to use admin rights.

I will change the readme to explain that exiftool.exe can't be used from the windows folder for Windows security reasons.
I already tried the same with two other packages using exiftool.exe. They have the same "issue".
Next to that: it is also on my todo list to include exiftool in my package as default to prevent all kind of issues (like the exiftool(-k).exe), and of course leave the Preference option if users want to use another, newer exiftool version

Thanks for the feedback.

@Kvcd12
Copy link

Kvcd12 commented May 23, 2021

I use a standard user account.

To allow ExifTool to run in a standard user account without administrator privileges I use Oliver Betz's alternate ExifTool Windows installer, which is discussed on ExifTool's homepage.

I am sure there are other ways to solve this problem.

My standard user account does not allow EXE, DLL, ... to run in the AppData folders. See: #101

On my system, this is why jExifToolGUI requires the administrator privileges. It appears, and I could be wrong, jExifToolGUI places a temporary DLL in the AppData folders to do something.

@hvdwolf
Copy link
Owner

hvdwolf commented May 23, 2021

It doesn't have to do with sqlite (as far as I can test). I also test on my work laptop which does not allow anything at all.
Please find attach a link to a 1.9.0 beta. It does not contain an exe, but a bat file, a jar and the jre.
1.9.0-beta-windows
Running exiftool from c:\windows is simply not possible. That would require admin rights from JTG and I don't want that.
The other issue probably had to do with spaces in the path. That worked correctly in earlier versions but "somehow something" had changed.
Please test if this one works correct.

@Kvcd12
Copy link

Kvcd12 commented May 23, 2021

Used bat file to open. Received the prompt regarding the location of ExifTool. jExifToolGUI didn't open. Tried again, no prompt, jExifToolGUI didn't open, location of ExifTool per log is correct. Saw splash screen in both tests. No prompt for administrator privileges in either test. Thank you.

First try log:

#logback.classic pattern: %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 15:46:40.580 [main] INFO org.hvdw.jexiftoolgui.Application - Start application 15:46:40.580 [main] INFO org.hvdw.jexiftoolgui.Application - Continuing in system language or, if not translated, in English 15:46:41.392 [AWT-EventQueue-0] INFO o.h.j.controllers.StandardFileIO - copied the initial database 15:46:41.392 [AWT-EventQueue-0] INFO org.hvdw.jexiftoolgui.mainScreen - string for DB: C:\Users\me\jexiftoolgui_data\jexiftoolgui.db 15:46:46.767 [AWT-EventQueue-0] INFO org.hvdw.jexiftoolgui.Utils - preference exiftool returned: null 15:46:47.001 [AWT-EventQueue-0] INFO org.hvdw.jexiftoolgui.Utils - exiftool_found mentions: true

Second try log:
#logback.classic pattern: %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 15:48:01.264 [main] INFO org.hvdw.jexiftoolgui.Application - Start application 15:48:01.264 [main] INFO org.hvdw.jexiftoolgui.Application - Continuing in system language or, if not translated, in English 15:48:01.873 [AWT-EventQueue-0] INFO org.hvdw.jexiftoolgui.mainScreen - string for DB: C:\Users\me\jexiftoolgui_data\jexiftoolgui.db 15:48:01.873 [AWT-EventQueue-0] INFO org.hvdw.jexiftoolgui.Utils - preference exiftool returned: C:\Program Files\ExifTool\ExifTool.exe 15:48:02.748 [AWT-EventQueue-0] INFO org.hvdw.jexiftoolgui.Utils - exiftool_found mentions: true

@hvdwolf
Copy link
Owner

hvdwolf commented May 24, 2021

I'm sorry.
I buillt in more error checks.
Please download this jar and copy it over the existing one from Yesterday.
And please try again.

@Kvcd12
Copy link

Kvcd12 commented May 24, 2021

The program would not open. Splash screen appears. The log:

#logback.classic pattern: %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 08:35:45.275 [main] INFO org.hvdw.jexiftoolgui.Application - Start application 08:35:45.275 [main] INFO org.hvdw.jexiftoolgui.Application - Continuing in system language or, if not translated, in English 08:35:46.197 [AWT-EventQueue-0] INFO org.hvdw.jexiftoolgui.mainScreen - string for DB: C:\Users\me\jexiftoolgui_data\jexiftoolgui.db 08:35:46.197 [AWT-EventQueue-0] INFO org.hvdw.jexiftoolgui.Utils - preference exiftool returned: C:\Program Files\ExifTool\ExifTool.exe 08:35:46.946 [AWT-EventQueue-0] INFO org.hvdw.jexiftoolgui.Utils - exiftool_found mentions: true

Today (I did not look yesterday), I looked to see if the DLL was appearing in the Temp folder. It is:

DLL in Temp

Thank you.

@WhiteRhyno
Copy link

I have the same problem as others on v1.8.1 Windows 10, the application fails to launch displaying an error that it cannot find exiftool.
The log file is helpful and provides the following error
14:03:26.965 [AWT-EventQueue-0] ERROR o.h.j.controllers.CommandRunner - IOException error
java.io.IOException: Cannot run program "C:/Users/Joseph/Jexiftool/exiftool.exeC:/Windows/exiftool.exe": CreateProcess error=2, The system cannot find the file specified
Registry

The Registry shows the same string as found in the log file (Thanks cpo-ux for pointing to the registry). I deleted one of the two entries, leaving the path to the Jexiftool parent directory where I had added the current (12.29) version of exiftool and the application launched.

@hvdwolf hvdwolf added bug Something isn't working and removed wontfix This will not be worked on labels Aug 20, 2021
@hvdwolf
Copy link
Owner

hvdwolf commented Aug 20, 2021

All,

(After long period of inactivity)
I finally found the bug. In case Windows has multiple versions in the path, jExifToolGUI goes wrong. I didn't test for this as this can't happen on a Linux or MacOS system. Even with multiple versions it will only take the first found.
Windows doesn't do that, as it shows multiple versions, but can still only use one.

Please check this Full Windows 1.9.0 beta.
https://mega.nz/file/IQlQmArC#MaH-KlgN9dUWBurcD5jT1dP58M7mjhY7MlevrqTOS-M

Other changes/fixes will be reported later in official changelog.

hvdwolf added a commit that referenced this issue Aug 20, 2021
@WhiteRhyno
Copy link

This was tested on a clean Windows 10 installation and it resolves the issue. Thanks.

@hvdwolf
Copy link
Owner

hvdwolf commented Aug 21, 2021

Thanks for the feedback 👍

@tester0077
Copy link

Running under Win 10 64-bit
Had downloaded jExifToolGUI-1.8.1.0-win-x86_64.zip, installed it, but it failed without feedback.
Then I found the link which says "fixed in beta" from the issues list: jExifToolGUI-1.9.0.0_beta-win-x86_64_with-jre.zip
this version also fails without feedback
Then I ran an earlier version 1.4.1 and it loads without errors.
FWIW, I have several copies of Exiftool.exe on my system, in several different locations, for different testing purposes and even installed Exiftool.exe to C:\Windows ( and renamed it as instructed)
My investigation with 1.8.1 version found that 1.81. had found 2 versions of Exiftool.exe and recorded them in the registry, in a somewhat curious format, but evidently could not decide which to use.
Still, it would be very helpful if there was some visible feedback to the user.
Since there is no installation needed, it also makes it difficult to really uninstall an older, non-working version and since it records details in the registry, it is even more dangerous to try and remove any left-overs and restart with a clean environment.
This is meant entirely as feedback. I have not had much chance to use the app, but found it does have some features I think will be very helpful.

@Versette
Copy link

Versette commented Nov 2, 2021

The only way that I could get jexiftoolgui to work is to change the registry entry mentioned above and to run as an administrator in Windows. Will not work as a standard user, needs administrator privileges apparently.

The registry key change I did in order to make it work was the following:

Computer\HKEY_CURRENT_USER\SOFTWARE\JavaSoft\Prefs\org\hvdw\jexiftoolgui Value name: exiftool Value data: /C:///Windows//exiftool.exe

This works when running jExifToolGUI.exe as admin. Running as standard user, it reports: Exiftool preference incorrect: The Exiftool specified in your preferences does not exist. Did you move/rename/delete it?

I had to do the same thing even with the latest version to fix it.

@hvdwolf
Copy link
Owner

hvdwolf commented Nov 2, 2021

This is not a BUG! The bug was that two (or more) installed versions of exiftool make JTG crash.
I will not change this and I will certainly not make my program a "require local admin" rights program because exiftool is installed on the wrong location. I know that Phil advises to do that, but if you check the exiftool forum, you will see that even there is it disapproved.
Putting an external program in c:\windows is a very bad habit, and something Microsoft doesn't want, already since Win3.x. Being a local admin on your system allows you to do so, BUT DON'T DO IT. Not one single program that is installable will do that.
It will prevent many programs that are not installed with local admin rights from being able to use it. Mine is one that can't use it either because I want my program to function without local admin rights, like any program should apart from system tools. Please put exiftool on another location, but not on the location Microsoft doesn't want to have it in.
That you can use exiftool from the command line because it is comfortably in the PATH (as that is why Phil is advising it), doesn't mean other programs can use it.

@hvdwolf hvdwolf reopened this Nov 4, 2021
@hvdwolf hvdwolf removed the Fixed label Nov 4, 2021
@hvdwolf
Copy link
Owner

hvdwolf commented Nov 4, 2021

After one day thinking: It is a "bug". My program now tries to use exiftool from c:\windows, but when it finds an exiftool.exe in c:\windows (or actually %SYSTEMROOT% if windows has been installed in another folder), it should simply refuse to use it.
But it is not the same as the original #110 which dealtt with multiple exiftools in the PATH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Fixed
Projects
None yet
Development

No branches or pull requests

9 participants