Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXE only runs from Program Files directory.

Status
Not open for further replies.

Gooser

Technical User
Jun 28, 2006
803
US

I downloaded and installed 7z (from 7-zip.org) because I want to use its command-line interface in a project I am working on. Unfortunately I can only run the 7z.exe from C:\Program Files\7-zip\7z.exe

Is there something I need to do to make an *.exe file available from anywhere in the filesystem on the computer, i.e. s:\backup\ ?

Thanks so much for any help. As a dba, this is kind of on the fringes of the area of my expertise.



v/r

Gooser

Why do today
that which may not need to be done tomorrow [ponder] --me

The Universal Model
 
You can just call it from that location...i.e. run c:\program files\blahblahblah

I'm Certifiable, not cert-ified.
It just means my answers are from experience, not a book.
 
Dave,

Thanks for the reply, but I'm not sure I can, or want to call it from that location. I have call it programmatically, in order to pass it a file, and catch the outcoming file and I'd prefer not to have to navigate around file structures that may or may not change. I would like to know how to make windows realize that this is an exe so that when I type it at any command prompt on that computer it will work.

Thanks again,
v/r
Gooser
 
If I am correct, you will want to add the directory location to the PATH environment variable. Doing this will mean you can call the EXE no matter what directory you are at in a CMD window.

--------------------------------------
"Insert funny comment in here!"
--------------------------------------
 
Yup...you'll have to include it in the PATH then.

I'm Certifiable, not cert-ified.
It just means my answers are from experience, not a book.
 
BTW, even doing it that way if that file isn't there any longer then you'll have to change your PATH statement again.

I'm Certifiable, not cert-ified.
It just means my answers are from experience, not a book.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top