WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: morenos1 on February 19, 2014, 01:04:18 PM

Title: Script reports different results compiled vs uncompiled.
Post by: morenos1 on February 19, 2014, 01:04:18 PM
I am working with this script which checks to see if a specific process is running.
I only know the first 3 characters of the process name (mct*.exe).

The script will be in a loop until the process is found and it will extract the whole process name (mct######).

If I run the script before I compile it, it works like it is supposed to (see DEBUG_uncompiled.TXT). It waits in the loop until the process shows up.

As soon as I compile the script, it never stays in the loop. It finds something and it ends (see WBDEBUG_compiled.TXT).

Why different results?
Title: Re: Script reports different results compiled vs uncompiled.
Post by: td on February 19, 2014, 01:21:05 PM
The usual cause is that your compiled script is finding itself because you have the partial name you are looking for as part of the compiled script's name.
Title: Re: Script reports different results compiled vs uncompiled.
Post by: morenos1 on February 19, 2014, 01:27:37 PM
That makes a lot of sense!

Fresh eyes ....

Thank You.....