locked
Creating child-process from cmd line fails with PATH issue RRS feed

  • Question

  • My Windows 7 Professional Edition on AMD64 started to act up recently and I was able to narrow it down to the following issue. Using an Administrator account I can launch the the cmd line and execute any system command:


    c:\>ver

    Microsoft Windows [Version 6.1.7601]

    However, when I try to use any such system command in a .bat file it won't find the command. I believe this has to do with the fact that the batch file interpreter actually forks a child process for the command and I can confirm that by just trying to call the 'ver' command like below from the command line:

    c:\>for /f %a in ('ver') do echo %a
    'ver' is not recognized as an internal or external command,
    operable program or batch file.

    I checked PATH settings, user privileges and the HKU\Software\Microsoft\Command Processor settings in the registry so far but to no avail. What else could there possibly be that impacts the way child-processes are launched from the cmd?

    All this worked fine a month ago and things must have gotten messed up through some software installation I can no longer trace back. There are no valid restore points unfortunately.

    Any idea would be greatly appreciated!

    Thanks,
    Holger

     

     

     

    Wednesday, May 4, 2011 9:29 PM

Answers

  • Hi Holger,

    Since you mentioned it worked before but after some application installed, it got messed up.

    Try a Clean Boot to disable the non-Microsoft services and the startup items, then check if it works.

    Regards,

    Miya


    This posting is provided "AS IS" with no warranties, and confers no rights. | Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    • Marked as answer by Miya Yao Thursday, May 19, 2011 10:44 AM
    Tuesday, May 10, 2011 8:19 AM