set path variable in xp so C++ compiler program can run in dos and go to any directory.

Posted on 2006-04-22
Last Modified: 2010-04-13
I opened a C++ compiler program in the DOS enviornment. I went to command prompt and copied files that I was supposed to off the CD. All that went well. Opened directory and copied files to it. Well, the C++ program does not work. I think that I need to set the Path in xp. I tried doing this once and messed up and had to get a fix it program that I downloaded. Is their any way I can set the path in DOS? I read that you can, or can I set a totally new path in enviornment variables? As long as the original path is there will this C++ program look for multiple paths then pick the one that works. I would rather not mess with the original path set by windows. thanx.
Question by:killion211
    LVL 32

    Expert Comment

    You can see what path you're currently using by typing "path" at the command prompt in your "dos" window.

    To set the path, you better off doing the following:

     Start -> Control panel -> System -> Advanced -> Environment variables

    and then select the variable "Path" and click on edit etc.

    Of course, you have to know what you want to make the path first. This depends a lot on which C++ compiler you're using.
    LVL 10

    Accepted Solution

    If you don't want to change the original path set by Windows, there are a few ways to change just the command prompt path.

    You can see the current path with the PATH command.

    If you want to add to the end of it use something like:
    set path=%path%;C:\New\Path

    If you want to add to the beginning of the existing path, use something like:
    set path=C:\New\Path;%path%

    Or if you want a brand new path use something like:
    set path=c:\windows\system32;C:\New\Path;C:\Compiler

    You can manually type these in which will be in effect until you close the command prompt, or put them in a batch file to run when you need them, or add them to the autoexec.nt to automatically run each time you run the command prompt.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    At the beginning of the year, the IT world was taken hostage by the shareholders of LogMeIn. Their free product, which had been free for ten years, all of the sudden became a "pay" product. Now, I am the first person who will say that software maker…
    NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now