msbatch file not working properly

What I Have:

The script in msbatch.bat is as follows, per the posting here:

@echo off
rem
rem %1 should be the name of the application (ex. msbatch.bat cnvdgn)
rem %2-%9 are other parameters to be passed through to the application
rem
runwait OpenBuildingsDesigner.exe -wa%1 -i%2 -i%3 -i%4 -i%5 -i%6 -i%7 -i%8 -i%9

This is called by this file (let's call it 'conversion_process.bat') I have set to run with task scheduler:

cd /d C:\Program Files\Bentley\OpenBuildings Connect Edition\OpenBuildingsDesigner
msbatch batchprocess P:\CAD\220_ARCHITECTURAL\OBD_Configuration\Dataset_FGG\Setting\batchprocessname.bprc > logfile.log 2>&1
pause

The file 'msbatch' is placed in the directory specified by the task scheduler script, and is the location of OpenBuildingsDesigner.exe.

The Issue:

Whenever I attempt to run the script, I get the following error:

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

Why is 'runwait' not recognized, where is this command supposed to be, and why are the only listings I can find about 'runwait' online referring to AutoHotKey, which my coworker does not have installed but can run this script with no problem? Is there an environment variable that I need to make sure is set before my PC will recognize the command as valid? Is this process even available for OpenBuildingsDesigner?

The '> logfile.log 2>&1' was needed as the command wouldn't run properly and thus the cmd window closes prior to the 'pause' command, not allowing me to see any error info.

Any help with this would be greatly appreciated!

Parents
  • Okay, I was speaking with my coworker (from whom I got the msbatch file to put into my executable directory, and thus should have had the same version of the file) and her version had 'start /wait' in place of 'runwait'. I made the change in my copy and lo and behold, it's working. I'm not sure if this is because runwait truly is just an AutoHotkey command or if runwait was depricated in some version of Windows, but for anyone with a similar issue as above the msbatch file should read as follows:

    @echo off
    rem
    rem %1 should be the name of the application (ex. msbatch.bat cnvdgn)
    rem %2-%9 are other parameters to be passed through to the application
    rem
    start /wait OpenBuildingsDesigner.exe -wa%1 -i%2 -i%3 -i%4 -i%5 -i%6 -i%7 -i%8 -i%9

    MISSING RESOURCE: VerifiedBy Paul MacKnight 

Reply
  • Okay, I was speaking with my coworker (from whom I got the msbatch file to put into my executable directory, and thus should have had the same version of the file) and her version had 'start /wait' in place of 'runwait'. I made the change in my copy and lo and behold, it's working. I'm not sure if this is because runwait truly is just an AutoHotkey command or if runwait was depricated in some version of Windows, but for anyone with a similar issue as above the msbatch file should read as follows:

    @echo off
    rem
    rem %1 should be the name of the application (ex. msbatch.bat cnvdgn)
    rem %2-%9 are other parameters to be passed through to the application
    rem
    start /wait OpenBuildingsDesigner.exe -wa%1 -i%2 -i%3 -i%4 -i%5 -i%6 -i%7 -i%8 -i%9

    MISSING RESOURCE: VerifiedBy Paul MacKnight 

Children