# Execute .exe file in subfolder in command prompt

• ljCharlie
• Proficient
• Joined: May 15, 2003
• Posts: 343
• Status: Offline

November 18th, 2003, 8:40 am

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

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
• Joined: 25 Feb 2008
• Posts: ?
• Loc: Ozzuland
• Status: Online

November 18th, 2003, 8:40 am

• whosonthedexs
• Student
• Joined: Nov 11, 2003
• Posts: 72
• Loc: UK
• Status: Offline

November 18th, 2003, 8:45 am

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
• Joined: May 15, 2003
• Posts: 343
• Status: Offline

November 18th, 2003, 8:49 am

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
• Joined: Sep 18, 2003
• Posts: 800
• Loc: California
• Status: Offline

November 18th, 2003, 9:57 am

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
• ljCharlie
• Proficient
• Joined: May 15, 2003
• Posts: 343
• Status: Offline

November 18th, 2003, 10:03 am

Thanks!

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

ljcharlie
• ModernDestroyer
• Professor
• Joined: Sep 18, 2003
• Posts: 800
• Loc: California
• Status: Offline

November 18th, 2003, 11:30 am

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
• ljCharlie
• Proficient
• Joined: May 15, 2003
• Posts: 343
• Status: Offline

November 18th, 2003, 11:56 am

Thanks!

ljCharlie
• ModernDestroyer
• Professor
• Joined: Sep 18, 2003
• Posts: 800
• Loc: California
• Status: Offline

November 18th, 2003, 1:14 pm

Everything work out ok or not?
• ljCharlie
• Proficient
• Joined: May 15, 2003
• Posts: 343
• Status: Offline

November 18th, 2003, 2:29 pm

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.

ljCharlie

## Post Information

• Total Posts in this topic: 9 posts
• Users browsing this forum: No registered users and 159 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

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.