Execute .exe file in subfolder in command prompt

  • ljCharlie
  • Proficient
  • Proficient
  • ljCharlie
  • Posts: 343

Post 3+ Months Ago

I used to do but now I don't remember. Will anyone show me how to access an .exe file in some subfolder of "C" drive in command prompt? Here's the problem that I am facing. I have installed HFNETCHK.EXE in a C:\Program Files\Shavlik Technologies\HFNetChk folder. Now, this program is a command line driven program, and I have to be in command prompt to use this program. The problem is, I have to type this whole path before I can use the hfnetchk.exe file. I want to be able to just type:

C:\hfnetchk.exe

Instead of:

C:\Program Files\Shavlik Technologies\HFNetChk\hfnetchk.exe

How do make the hfnetchk.exe relevent in anywhere in the command prompt?

Any help is greatly appreciated!

ljCharlie
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • whosonthedexs
  • Student
  • Student
  • User avatar
  • Posts: 72
  • Loc: UK

Post 3+ Months Ago

You should be able to refer to this path in environment variables under, My Computer -> Properties (Win NT4 or later)

OR Specify a PATH statement in autoexec.bat (Win 9x)
  • ljCharlie
  • Proficient
  • Proficient
  • ljCharlie
  • Posts: 343

Post 3+ Months Ago

First, of all. Thank you very much for the response.

I thought the system or user variable enviroment was the way to go about it, but I wasn't sure how it work. Here's what I did. I use "hfnetchk" as the variable and C:\Program Files\Shavlik Technologies\HFNetChk as the path...but when I type:

C:\hfnetchk

in the command prompt, it didn't work.

ljCharlie
  • ModernDestroyer
  • Professor
  • Professor
  • User avatar
  • Posts: 794
  • Loc: California

Post 3+ Months Ago

Have you tried adding the path to the config.nt file in your \winnt\system32 , here is the code I would try at the bottom of the config.nt file. Just a safety precaution I would make a copy of the current one and put it somewhere you can get it at.

Code: [ Select ]
path=C:\;C:\winnt;C:\Program Files\Shavlik Technologies\HFNetChk

I can't remember if the separator between the folders listed is a "," or a ";" try it both ways one is sure to work. If not you may have to make a DOS short cut on the desktop and edit the properties of the shortcut with the desired path.

Also the Autoexec.nt file is also in the \winnt\system32 folder for future reference Enjoy :D
  • ljCharlie
  • Proficient
  • Proficient
  • ljCharlie
  • Posts: 343

Post 3+ Months Ago

Thanks!

Now, do I have to reboot the computer after I add this line in?

ljcharlie
  • ModernDestroyer
  • Professor
  • Professor
  • User avatar
  • Posts: 794
  • Loc: California

Post 3+ Months Ago

Make sure you have a NTFS or winnt boot disk just in case you need it when you reboot. Like I said before I can't remember if the separators are "," or ";" you may have to try it both ways. But yes you will have to reboot in order for the changes to take effect. Enjoy :D
  • ljCharlie
  • Proficient
  • Proficient
  • ljCharlie
  • Posts: 343

Post 3+ Months Ago

Thanks!

ljCharlie
  • ModernDestroyer
  • Professor
  • Professor
  • User avatar
  • Posts: 794
  • Loc: California

Post 3+ Months Ago

Everything work out ok or not?
  • ljCharlie
  • Proficient
  • Proficient
  • ljCharlie
  • Posts: 343

Post 3+ Months Ago

I got it working using the Environment variables now. I guess what I did wrong was I didn't add the path to the variable name PATH. And what I probably should have done is reboot the system.

Anyhow, it work out okay.

Many thanks for your effort.

ljCharlie

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 58 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.