Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Doesn't follow the PATH env variable

Doesn't follow the PATH env variable

Scheduled Pinned Locked Moved The Lounge
comhelpquestionworkspace
9 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Joe Q
    wrote on last edited by
    #1

    I think this is something simple but... I have a Windows XP system and I entered 'attrib' from the command line (cmd.exe) but it said it was not an internal or external command. But I could go to c:\windows\system32 and enter 'attrib' and it worked. The 'attrib.exe' was in that directory. The PATH environment variable seems to be set correctly with c:\windows\system32 as the first item in the list. There was a computer "IT professional" messing with this computer but he said he didn't do anything that would cause that problem. Any suggestions?

    Joe Q My Blog

    V L S 3 Replies Last reply
    0
    • J Joe Q

      I think this is something simple but... I have a Windows XP system and I entered 'attrib' from the command line (cmd.exe) but it said it was not an internal or external command. But I could go to c:\windows\system32 and enter 'attrib' and it worked. The 'attrib.exe' was in that directory. The PATH environment variable seems to be set correctly with c:\windows\system32 as the first item in the list. There was a computer "IT professional" messing with this computer but he said he didn't do anything that would cause that problem. Any suggestions?

      Joe Q My Blog

      V Offline
      V Offline
      Vikram A Punathambekar
      wrote on last edited by
      #2

      Sorry if this is a daft question, but did you type that into a fresh console window? If you change the PATH on a console window, it changes for *that window only*.

      Cheers, Vikram.


      Zeppelin's law: In any Soapbox discussion involving Stan Shannon, the probability of the term "leftist" or "Marxist" appearing approaches 1 monotonically. Harris' addendum: I think you meant "monotonously". Martin's second addendum: Jeffersonian... I think that should at least get a mention.

      J 1 Reply Last reply
      0
      • J Joe Q

        I think this is something simple but... I have a Windows XP system and I entered 'attrib' from the command line (cmd.exe) but it said it was not an internal or external command. But I could go to c:\windows\system32 and enter 'attrib' and it worked. The 'attrib.exe' was in that directory. The PATH environment variable seems to be set correctly with c:\windows\system32 as the first item in the list. There was a computer "IT professional" messing with this computer but he said he didn't do anything that would cause that problem. Any suggestions?

        Joe Q My Blog

        L Offline
        L Offline
        leppie
        wrote on last edited by
        #3

        It should work unless the PATH is overridden somehow. Try the following at the command prompt: echo %PATH% where attrib to see what it is picked up from.

        xacc.ide - now with IronScheme support
        IronScheme - 1.0 alpha 2 out now

        J 1 Reply Last reply
        0
        • V Vikram A Punathambekar

          Sorry if this is a daft question, but did you type that into a fresh console window? If you change the PATH on a console window, it changes for *that window only*.

          Cheers, Vikram.


          Zeppelin's law: In any Soapbox discussion involving Stan Shannon, the probability of the term "leftist" or "Marxist" appearing approaches 1 monotonically. Harris' addendum: I think you meant "monotonously". Martin's second addendum: Jeffersonian... I think that should at least get a mention.

          J Offline
          J Offline
          Joe Q
          wrote on last edited by
          #4

          Yes, it is a fresh cmd window. I found this problem when I had a couple of batch files that stopped working. The batch files change Read-Only attributes on certain files and directorys.

          Joe Q My Blog

          1 Reply Last reply
          0
          • L leppie

            It should work unless the PATH is overridden somehow. Try the following at the command prompt: echo %PATH% where attrib to see what it is picked up from.

            xacc.ide - now with IronScheme support
            IronScheme - 1.0 alpha 2 out now

            J Offline
            J Offline
            Joe Q
            wrote on last edited by
            #5

            leppie wrote:

            echo %PATH%

            it displays a valid path with c:\windows\system32 as it's first element.

            leppie wrote:

            where attrib to see what it is picked up from.

            This windows system has no "where" or "whereis" command on it

            Joe Q My Blog

            1 Reply Last reply
            0
            • J Joe Q

              I think this is something simple but... I have a Windows XP system and I entered 'attrib' from the command line (cmd.exe) but it said it was not an internal or external command. But I could go to c:\windows\system32 and enter 'attrib' and it worked. The 'attrib.exe' was in that directory. The PATH environment variable seems to be set correctly with c:\windows\system32 as the first item in the list. There was a computer "IT professional" messing with this computer but he said he didn't do anything that would cause that problem. Any suggestions?

              Joe Q My Blog

              S Offline
              S Offline
              Sebastian Schneider
              wrote on last edited by
              #6

              Well, "where" is useless, because the system does not find "attrib" in the first place. Well, maybe he rewrote the path and wrote "C;\Windows\System32\;" or "C:\Windows\System32:" instead. These typos can be hard to spot. does "c:\windows\system32\attrib.exe -r somefile.ext" work? If not, someone may have hijacked your system. Oh, and does "echo %windir%" really print "C:\Windows"? On a few machines here, the directory is c:\winXP ... If not, you need to rewrite the path command to include "%windir%\system32"

              Cheers, Sebastian -- "If it was two men, the non-driver would have challenged the driver to simply crash through the gates. The macho image thing, you know." - Marc Clifton

              J 1 Reply Last reply
              0
              • S Sebastian Schneider

                Well, "where" is useless, because the system does not find "attrib" in the first place. Well, maybe he rewrote the path and wrote "C;\Windows\System32\;" or "C:\Windows\System32:" instead. These typos can be hard to spot. does "c:\windows\system32\attrib.exe -r somefile.ext" work? If not, someone may have hijacked your system. Oh, and does "echo %windir%" really print "C:\Windows"? On a few machines here, the directory is c:\winXP ... If not, you need to rewrite the path command to include "%windir%\system32"

                Cheers, Sebastian -- "If it was two men, the non-driver would have challenged the driver to simply crash through the gates. The macho image thing, you know." - Marc Clifton

                J Offline
                J Offline
                Joe Q
                wrote on last edited by
                #7

                Sebastian Schneider wrote:

                Well, maybe he rewrote the path and wrote "C;\Windows\System32\;" or "C:\Windows\System32:" instead. These typos can be hard to spot.

                I went back and checked very closely and it didn't have any of those typo's. If one of those typos were further down in the path would it invalidate the entire path?

                Sebastian Schneider wrote:

                does "c:\windows\system32\attrib.exe -r somefile.ext" work?

                This does work.

                Sebastian Schneider wrote:

                If not, someone may have hijacked your system.

                The system I'm working with is not on any network (not even an internal network)

                Joe Q My Blog

                S 1 Reply Last reply
                0
                • J Joe Q

                  Sebastian Schneider wrote:

                  Well, maybe he rewrote the path and wrote "C;\Windows\System32\;" or "C:\Windows\System32:" instead. These typos can be hard to spot.

                  I went back and checked very closely and it didn't have any of those typo's. If one of those typos were further down in the path would it invalidate the entire path?

                  Sebastian Schneider wrote:

                  does "c:\windows\system32\attrib.exe -r somefile.ext" work?

                  This does work.

                  Sebastian Schneider wrote:

                  If not, someone may have hijacked your system.

                  The system I'm working with is not on any network (not even an internal network)

                  Joe Q My Blog

                  S Offline
                  S Offline
                  Sebastian Schneider
                  wrote on last edited by
                  #8

                  No, the path is semicolon-delimited. So, there may be invalid elements, but it won't invalidate the entire path. Well... what is the pathext environment variable set to? Other than that, I don't have a clue. I've just read that, sometimes, if you set the path in user environment variables, SET will still display the system environment variables, without actually using them. Or similar, claimed here: http://mail.python.org/pipermail/python-list/2002-September/165998.html[^] Bill Stewart also has a site dedicated to CMD Problems. http://www.westmesatech.com/cmdprompt.html[^]

                  Cheers, Sebastian -- "If it was two men, the non-driver would have challenged the driver to simply crash through the gates. The macho image thing, you know." - Marc Clifton

                  J 1 Reply Last reply
                  0
                  • S Sebastian Schneider

                    No, the path is semicolon-delimited. So, there may be invalid elements, but it won't invalidate the entire path. Well... what is the pathext environment variable set to? Other than that, I don't have a clue. I've just read that, sometimes, if you set the path in user environment variables, SET will still display the system environment variables, without actually using them. Or similar, claimed here: http://mail.python.org/pipermail/python-list/2002-September/165998.html[^] Bill Stewart also has a site dedicated to CMD Problems. http://www.westmesatech.com/cmdprompt.html[^]

                    Cheers, Sebastian -- "If it was two men, the non-driver would have challenged the driver to simply crash through the gates. The macho image thing, you know." - Marc Clifton

                    J Offline
                    J Offline
                    Joe Q
                    wrote on last edited by
                    #9

                    Thanks for the help, I'm through working on the problem by default. I had to leave to catch my flight and now someone else can work on it. I'll probably get calls about it but from 1211 miles away (google maps) I can just tell them to get someone local to look at it or get the guy back who caused it. Thanks for your help. I will read through the sites to see if anything might help.

                    Joe Q My Blog

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups