0

i have an unzip.exe file. i want to register it to environment variable such that when ever user type unzip in his command prompt he/she can use unzip.exe file. I what to do this using Command prompt. how should i do this.

Thanks in Advance

4
  • 1
    You're looking for the setx command, built into Windows 7 or available on older versions with the Resource Kit. Commented Aug 2, 2013 at 7:14
  • Yes something like setx i have tried 'setx path C:\mypath' but above code replacing existing path values at the same time i what a command to remove this path from environment variable Commented Aug 2, 2013 at 7:19
  • If you want to append a directory to the path, you need to include the current %PATH%: setx path ^%PATH^%;C:\mypath. Commented Aug 2, 2013 at 8:55
  • %PATH%: setx path ^%PATH^%;C:\mypath it is now working Commented Aug 2, 2013 at 9:22

1 Answer 1

1

This is a quick and different method and will add unzip.exe to an existing part of the path.

copy unzip.exe "%windir%" 
Sign up to request clarification or add additional context in comments.

1 Comment

del "%windir%\unzip.exe" That will remove it, when it is not in use.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.