1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

A Faulty Path Issue XP SP2

Discussion in 'Windows XP' started by Izzy, 2006/08/04.

  1. 2006/08/04
    Izzy

    Izzy Inactive Thread Starter

    Joined:
    2006/02/21
    Messages:
    3
    Likes Received:
    0
    Open a command prompt - Start-Run-cmd.exe and issue these commands:
    cd
    Should Return:
    C:\Documents and Settings\UserName>

    Change folders to Program Files:
    cd C:\Program Files\

    Should return:
    C:\Program Files>

    Now open a subshell here by issuing the cmd.exe command:
    Should return or similar:
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Program Files>


    This is normal and correct behavior.

    Now issue exit to return to the first prompt, then exit again to close the command prompt.

    Now for the Faulty Path Issue

    Create a test.bat file that contains this:
    Code:
    @ECHO OFF
    
    echo %cd%
    GOTO END
    
    :END
    pause


    Save the file to a folder on your C: drive. For this example I will save it to C:\test

    Now open a command prompt again as described above:
    Should return:
    C:\Documents and Settings\UserName>

    Now cd to the test folder on C:
    cd C:\test\

    Should return:
    C:\test>

    Execute the test.bat file you created and placed in there:
    C:\test>test.bat

    Returns:
    C:\Documents and Settings\UserName>

    Which is wrong it should return:
    c:\test>

    Now why would this be happening and does any kind person know of the fix?
    This has me absolutely stummped. :confused:
    It is causing certain programs not to start or find dependancies.
    Thanks in advance.
     
    Izzy,
    #1
  2. 2006/08/04
    Steve R Jones

    Steve R Jones SuperGeek Staff

    Joined:
    2001/12/30
    Messages:
    12,285
    Likes Received:
    249
    Open a command prompt - Start-Run-cmd.exe and issue these commands:
    cd
    Should Return:
    C:\Documents and Settings\UserName>

    What does it return?
    When I do it, I'm at C:\Documents and Settings\UserName>
     

  3. to hide this advert.

  4. 2006/08/04
    Izzy

    Izzy Inactive Thread Starter

    Joined:
    2006/02/21
    Messages:
    3
    Likes Received:
    0
    That is correct. This is normal and the correct behavior. The first part of my post is to explain that all is normal up to the last part of my post. Thank you for reading the the first part of my post.

    Now try the rest of my post from this line:
    Now for the Faulty Path Issue
    and see if you get the C:\Documents and Settings\UserName> prompt instead of the c:\test> prompt.
     
    Izzy,
    #3
  5. 2006/08/04
    Arie

    Arie Administrator Administrator Staff

    Joined:
    2001/12/27
    Messages:
    15,174
    Likes Received:
    412
    Works fine for me...
     
    Arie,
    #4
  6. 2006/08/04
    Izzy

    Izzy Inactive Thread Starter

    Joined:
    2006/02/21
    Messages:
    3
    Likes Received:
    0
    :) Thank you for taking the time to look at this and I am pleased that your machine behaves as expected.

    It should work on most Windows machines but obviously it does not work as expected on all, as is the case in my original post.

    Alas it returns C:\Documents and Settings\UserName> instead of the expected C:\test> as portrayed in the second part of my post.

    Thats why I am here.

    I have a feeling that this issue might be somewhat over the heads of those "experts" who frequent these forums due mainly in part to the fact that, without an understanding of the problem, replication would be extremely difficult if not impossible.

    The questions to ask are:
    Why, when manually issuing a CD at the command prompt, does it behave as expected, as in the first part of my original post?

    Why from within a batch file or from within another program or dll does it behave in an unexpected manner and return the users default home folder instead of the path it is already in?

    Where does it call the expected path from when manually entering the CD command, as in the first part of my post?

    Where does it call the path when executing the CD command from with within a batch file, as in the second part my post?

    Without decompiling the binary file, end users could only hazard a guess as to where these calls are made to. The registry is the most obvious place it may call the paths from but where in the registry. It would be difficult to do a search as visualising a key word(s) to use would be very difficult indeed.

    Thanks in advance to any one with an in depth understanding of the workings of the proceedures involved in this issue and who cares to make an educated guess, instead of a bunch of useless "me too" type replies, as I could investigate those educated guesses and hopefully resolve this issue and change it's errant behaviour.
    :)
     
    Last edited: 2006/08/04
    Izzy,
    #5
  7. 2006/08/05
    Arie

    Arie Administrator Administrator Staff

    Joined:
    2001/12/27
    Messages:
    15,174
    Likes Received:
    412
    Yes, I admit, I have NO clue, and I'm quite sure nobody else will have too, as it just doesn't make sense.

    (Maybe someone can prove me wrong?)

    Good luck in finding a solution!
     
    Arie,
    #6

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.