Menu

Error level -1

James
2018-01-03
2018-01-03
  • James

    James - 2018-01-03

    I'm not sure if this counts as Install Problems as I have previously managed to install and run exiftool.

    I have downloaded and unzipped exiftool(-k).exe. I have also copied it to C:\Windows\exiftool.exe as per the instructions.

    When I double click on exiftool(-k).exe to run it nothing seems to happen except a brief flash of a cmd window. When I try and run it from a cmd prompt window, either typing the full path, dragging the exe in to the cmd window, or just typing the name I get the same result: Nothing happens and the %ERRORLEVEL% is set to -1.

    I am running Windows 10 Professional, and the standalone zip of exiftool 10.71. I have also tried running exiftool(-k).exe from versions 10.70 and 10.69 with the same result.

    The only thing that has changed recently is the a Domain Security policy has been applied which restricts where programs can be run from. Both versions of the exiftool exe are in folders where programs are allowed to run. If I try and run exoftool.exe outside of these folders I get an error message saying that the system administrator has blocked this program. I do not get this error message when running it inside the allowed folder.

     
  • Phil Harvey

    Phil Harvey - 2018-01-03

    Hi James,

    This may happen if the self-extraction is interrupted the first time that exiftool is run. Try following the uninstall instruction ii here, then run exiftool(-k).exe again an let me know how it goes:

    http://owl.phy.queensu.ca/~phil/exiftool/install.html#Windows

     

    Last edit: Phil Harvey 2018-01-03
  • Phil Harvey

    Phil Harvey - 2018-01-03

    Oops. no. I now understand that 10.69 and 10.70 also no longer work for you.

    So it is a Windows security problem. Try running as administrator.

    See this thread

     

    Last edit: Phil Harvey 2018-01-03
  • James

    James - 2018-01-03

    I tried running as administrator as well. I think the problem is the domain security policy. In the event viewer I get the following error after doing the uninstall and re-installing:
    Access to C:\Users\<user>\AppData\Local\Temp\par-6a616d6573\cache-exiftool-10.71/exiftool.exe has been restricted by your Administrator by the default software restriction policy level.

    Is there a way to make it run from a specified folder rather than the temp folder? I'm not going to be able to get the domain security policy changed to get around that.

     
  • Phil Harvey

    Phil Harvey - 2018-01-03

    You should be able to change your TEMP environment variable to run from where you want, although I can't help you with the details there.

     
  • James

    James - 2018-01-03

    I managed to change my TEMP environment variable, and exiftool -k ran fine from the cmd prompt. When I changed the environment variable back it stopped working.

    I also copied the extracted files from the new TEMP folder in to the default TEMP folder but it still doesn't run after the environment variables are changed back.

    For closure, and for anyone else who finds this thread with the same problem, I fixed it by making a symlink or junction from the default TEMP folder to the new TEMP folder. I followed this guide: https://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/

    To summarise the linked article, in an Administrator command prompt use the following command:

    mklink /J %USERPROFILE%\AppData\Local\Temp\par-XXX C:\%NEWFOLDER%\Temp\par-XXX

    mklink creates the symbolic link and the J flag creates a junction, or link between folders.

    %USERPROFILE% is replaced by the path to your user folder, %NEWFOLDER% is replaced by the path to the new folder where exiftool.exe extracted itself on first run, and par-XXX is the random folder name that exiftool created.

    %USERPROFILE%\AppData\Local\Temp\par-XXX needs to be deleted before you can create the junction if it was already created, as it was with me.

    Thanks very much for your help Phil!

     
  • Phil Harvey

    Phil Harvey - 2018-01-03

    And thanks to you for posting the solution

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.