TechSpot

DOS help in XP pro

By gbhall
Feb 8, 2009
  1. MS has really got me confused ! There is no actual Dos under XP as we all well know, but the implementation of a command window gets more extensive with every issue of Windows - as witness the ROBOCOPY command in Vista !!

    Now my problem is - where the heck is the PATH property specified ?

    When I open a command window which is running cmd.exe in System32, there is a long path name there already, with things added by certain installed programs, like (would you believe) quicktime. In addition to which I have found there is an AUTOEXEC.NT file in SYSTEM32 and an AUTOEXEC.DOS in C:\ Neither of those has a PATH line in them.

    If I open Control panel / system advanced tab and click the 'environment variables' button, there is a Path variable there, but by experiment, all it does is it ADDS to the path already present in any command windows EXCEPT a window which runs command.com instead of cmd.exe

    More and more confusing - two command language processors, and at least three places where a Path can appear, one of which - the most important - I cannot even find !

    I would at this point say I need both of the command processors, because there are certain 16-bit programms I like to run occasionally which will work fine under command.com, but do nothing under cmd.exe....

    I would love it if someone could point me to a tutorial on 'dos in windows XP'
     
  2. rickoh

    rickoh TS Rookie

    gbhall

    hold down win key...(between ctrl and alt) and hit r
    type cmd in the box


    oops...saw that you did that....sorry.
     
  3. LookinAround

    LookinAround TechSpot Chancellor Posts: 8,398   +169

    The Windows PATH system variable (as defined via Windows system variables) should appear exactly as you define it in all command windows you open AFTER you've changed the PATH system variable. Not anything currently open. New command windows inherit CURRENT value of the Windows PATH. You can append, change, delete whatever you please to the system PATH variable

    If you open a command window, remember that path is just a shell variable
    => From command prompt just type path to see your currrent Path variable
    => From command prompt, type path=yyyy to set the path variable in THAT current shell to yyyy

    /* EDIT */
    And don't forget the importance of enclosing things in quotes as otherwise you can get DOS command prompt very confused when it sees spaces or * or other special characters. e.g. PATH="C:\Windows\Program Files" is right, PATH=C:\Windows\Program Files will never work
     
  4. gbhall

    gbhall TechSpot Chancellor Topic Starter Posts: 2,366   +54

    What I am asking is where is the extensive PATH defined ? The one that is there already when a command shell is opened. try it, what do you get ? I get this....

    PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Pinnacle\Shared Files\InstantCDDVD\;C:\

    where the last C:\ is the only thing in my windows path system variable.
     
  5. rickoh

    rickoh TS Rookie

    gbhall

    have you tried 'doskey'? as a command?
     
  6. LookinAround

    LookinAround TechSpot Chancellor Posts: 8,398   +169

    AHH.... Now i think i know what you are asking. Check out this:

    When you look at your Environment Variables in Windows, note there are two sets of variables
    • User variables for your logon (in upper window pane)
    • System variables (in lower window pane)

    Check to see if you have a PATH variable defined as each! both as a user and a system variable. The command window shell PATH is then the concatenation of both!
     
  7. Bernie157

    Bernie157 TS Rookie

    The path is set in the System Environment variables. You get to them by right-clicking on My Computer, then Properties (at the bottom), then the Advanced tab, then the Environment Variables button near the bottom.

    To answer what I thought you were asking originally, you change directories from within the command prompt window with the CD command, e.g. CD \directory1\direcotry2 etc. You can use * as a wildcard, as in CD \dir* or CD \*ory1.

    And I think you also asked: "Where is the PATH command?" Back in the days of real DOS, many commands were imbedded in the file COMMAND.COM and maybe that's the case with Windows DOS.

    Bernie
     
  8. gbhall

    gbhall TechSpot Chancellor Topic Starter Posts: 2,366   +54

    Bernie, sorry to confuse, I meant the Path variable or parameter specification, not the command, which is indeed in command.com or cmd.exe

    LookinAround has the correct answer to my question - there are two PATH parameters in Systen environment properties - one for user and one for 'all users' or system if you will. The latter is the one installs write to if they insist on having a path extension to work properly. Those packages were written for Win98 or thereabouts
     
Topic Status:
Not open for further replies.


Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...


Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.