I have this strange issue only seen on Windows 2008. On Windows 2003, I am running fine.

My C++ program will calls a bat file, using the system() command. Inside the batch file, it will call the wlbs command. However, when running the batch file from the program, I see the following error:

'wlbs' is not recognized as an internal or external command, operable program or batch file.

I echoed the %PATH% environment variable and see that C:\Windows\System32 is already there.

If I run the batch file from the same user account that I am starting the program from, on the command line, the batch file was able to invoke the command successfully. I already selected the program to be ran as Administrator, and my login session is also administrator.

I updated the batch file to output the dir listing, like "dir C:\Windows\System32\*.exe > list.txt" and surprisingly, in the list.txt, it was able to list out other exe except for the wlbs.exe (and I suspect a bunch of other exe were missing as well), when I run the batch file from my program.

However, when I run the batch file from the commandline, I was able to see the wlbs.exe from the list.txt generated from above. It seems that the issue only happens if the batch file was invoked from the program.

I also attempt to update the file permission for C:\Windows\System32\wlbs.exe but the update options are disabled by default, despite that I am logged in as Administrator already on the system.

Any help on the above issue would be appreciated.


Your windows 2008 server is probably a 64x system. In such system there are two different system32 folders. For 32 bit executable on 64 bit system the %systemroot%\syswow64 is what they see as %systemroot%\system32. Strange world.

For a quick fix, You can just copy the wlbs.exe program to the %systemroot%\syswow64 folder.

  • 1
    Thanks for your reply, your answer is helpful in pointing me to the right direction and after some research the binaries can be executed by referencing the path %SystemRoot%\sysnative\ directly. – user52498 Jul 20 '10 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.