• C

Running a C Program from MS-DOS

I have a C program that has a PC executable and Unix executable. In Windows 95 I can access the MS-DOS window by going to run and typing command. How do I get the program to run. The executable in in Unix in the path /devel/airspace99/.  MS DOS defaults to
C:\WINDOWS\DESKTOP. How can I get this thing to run on a pc through MS DOS?
tomatocansAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

imladrisCommented:
Not quite clear on where you're stuck.
Perhaps a description will help.

In MS DOS the system takes commandline input. The first word on the line is taken to be an internal or external command. If it is an internal command (such as "copy") the command processor executes it. If it is not an internal command, it is assumed to be an external command, it a program of that name is searched for. MS DOS will look in the current directory, the in each directory on the path in turn (type "path" to see what your path is) looking for "progname.com" or "progname.exe".

I'm not sure what relevance the location of your program in a Unix system (/devel/airspace99) has to this problem.

It can also be executed directly by specifying the whole path. Open an MS DOS window (or boot your DOS machine) and type c:\dir1\dir2\dir3\progname, where c, is the drive it is on, dir1-3 are the directories on the path.
0
tomatocansAuthor Commented:
does only the executable have to be in this directory
0
Mahdi MansourDesign Monitoring & Evaluation ManagerCommented:
u can run any c executable program (.exe) simply by giving the path
u can make that in a command
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

tomatocansAuthor Commented:
I put path=C:\RM\ResourceMonitor_v4.0.exe

nothing
0
imladrisCommented:
No, the path indicates the directories to search in. So this case would be managed by:

path=C:\RM

though you probably want other directories in there as well, for example:

path=C:\WINDOWS;C:\TMP\STUFF;C:\RM

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tomatocansAuthor Commented:
Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C

From novice to tech pro — start learning today.