Using my program




Hello,
Ive built a simple conversion program for myself for school using visual studio 2008. My question is is it possible to take the program and get it to run as if I typed in notepad or calculator( for example) in run? If not maybe it can be run out of the command prompt?
If you want to use it like notepad or calculator you need to program your program in using WinAPI, otherwise your program will alway be inside the command prompt. If you do not want to learn winapi, you can download VC++ and use MFC Application Creator.
I believe you're referring to Start->Run->[program name], right?

That is done via the registry or by adding the directory path of your program to the Environment Variable "PATH":
Right-click My Computer
Choose 'Properties'
Select the 'Advanced' tab
Click the 'Environment Variables' button
Add your directory path to the PATH variable in the top box if you want it only for your user account or in the bottom box if you want it to be able to run by any user that uses the computer

Note that if you use the top box, it may not have PATH listed. In that case, click the 'New' button under that top box and add your directory path.

Also note that "directory path" refers to the directory your program is found in (e.g. C:\ProgramName). It isn't the program itself (e.g. C:\ProgramName\program.exe).
If you're going to be using this at school, they probably won't like it (or won't let you) put it in the path on their boxes. You could instead create a .bat script file that just runs 'cmd' at the current directory (your usb drive). Or it could run cmd and then the program.... or just the program .... but then you could just double click your program instead of the bat file... i dunno
rpgfan3233 I tried your method. I added it to my directory under path but it doesnt find it.

the programs name is meter_mile1 and the path i used first was
C:\meter_mile1

Then just for order purposes I put it in my program file folder and used:
C:\Program Files\meter_mile1

Maybe I typed my directory path in incorrect?
Last edited on
If your .exe file is located in C:\Program Files\meter_mile1, then it should run. This may sound silly, but have you tried logging off or rebooting? Windows doesn't always update things like that when you want it to, and that is the only way to force the update. :P
Topic archived. No new replies allowed.