0

I have installed UnZip so I can extract files by running batch files, I added the bin folder to both PATH (user variables) and Path (system variables), but I still have the following problem:

I created this batch file and saved it as a .cmd file:

unzip
timeout /t 10 /nobreak

If I place the file in any folder on my computer and double click it, I get this message:

'unzip' is not recognized as an internal or external command,
operable program or batch file

If I right-click it and choose Run as administrator, then the batch file is run and unzip is recognized.

Then, it happened that I moved the same file on the Desktop, double click and it worked. I tried moving the file around in different locations, but I still can't get it working. So I have to either keep it on desktop or run it as administrator.

I am running Windows 8.1.

How can I make it run normally (non-administrator) without having to keep it on the desktop?

Output from echo %path% in a cmd shell:

C:\bin\emsdk;C:\bin\emsdk\mingw\4.6.2_32bit;C:\bin\emsdk\clang\e1.34.1_64bit;C:\bin\emsdk\node\0.12.2_64bit;C:\bin\emsdk\python\2.7.5.3_64bit;C:\bin\emsdk\emscripten\1.34.1;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Windows\CCM;C:\bin\git\bin\;C:\bin\Git\cmd;C:\Program Files (x86)\Brackets\command;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Users\I323547\AppData\Local\Programs\Python\Python35-32\Scripts\;C:\Users\I323547\AppData\Local\Programs\Python\Python35-32\;C:\Users\I323547\AppData\Roaming\npm;C:\program files\apache-maven-3.3.9\bin;C:\Users\I323547\AppData\Local\atom\bin;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\nodejs\;C:\Program Files (x86)\GnuWin32\bin;C:\Users\I323547\AppData\Local\Programs\Python\Python35-32\Scripts\;C:\Users\I323547\AppData\Local\Programs\Python\Python35-32\;C:\program files\apache-maven-3.3.9\bin;C:\bin;C:\Users\I323547\AppData\Roaming\npm;C:\Program Files (x86)\GnuWin32\bin; 

The unzip.exe live in this folder which path knows about:

C:\Program Files (x86)\GnuWin32\bin;
  • Add it to your PATH. – DavidPostill Mar 10 '16 at 0:12
  • But I have added it already to both Path (system variables) and also to PATH (user variables). And why is it working from Desktop and not from any other location? – Roco CTZ Mar 10 '16 at 20:31
  • Please edit and include the output from path in a cmd shell. – DavidPostill Mar 10 '16 at 20:33
  • Please put it on one line with no editing. – DavidPostill Mar 10 '16 at 20:55
  • I would start by 1/ removing the blank space at the end of the path (you shouldn't have ; in a path). 2/ Removing all the duplicate entries. You only need stuff in user or system not both. You have a lot of stuff in there twice. – DavidPostill Mar 10 '16 at 21:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.