Forum Discussion

stein_oddvar_ra's avatar
stein_oddvar_ra
Contributor
8 years ago

How can I set the default directory when running batch files in TC11.31?

In our TestComplete project we use a number of batch-files (.bat/.cmd) to run applications and scripts. These were located on a shared network drive, mapped to the client with a drive letter.

 

In TC10 the batch-files ran without problems, but in TC11 we are getting an error:

 

"'\\SERVER\Path to app\bin\'

CMD.EXE was started with the above path as the current directory.

UNC paths are not supported. Defaulting to windows directory."

 

And my batch-scripts fail in several places.

 

When I add applications (batch-files) to TestedPrograms using drive letters, the program is run using UNC-path.

Is there a way to force TC11 to use the drive letters instead of the UNC-path?

3 Replies

  • Can you verify whether you are using version 11.30 or 11.31?  There was an issue like this in 11.30, and fixed in 11.31 (and with a patch to 11.30).

    • stein_oddvar_ra's avatar
      stein_oddvar_ra
      Contributor

      I am using 11.31. 11.30 had other issues with UNC-paths for TestedApps that was fixed in 11.31.

       

      The issue now is that if a TestedApp is located in a shared directory, the path (both the working directory and the path to the application) is replaced with a UNC-path.

       

       

      I.e. when I add a TestedApp at L:\bin\app.exe with a working directory of L:\data these are replaced with \\server\share\bin\app.exe and \\server\share\data. This breaks functionality in some bat-scripts I have added as TestedApps.

       

      This is new with TC11, TC10 does not do this, although you are asked if you want to convert non-UNC paths to UNC-paths if TC discovers that the app is on a mapped share. You could answer no. Is this no longer possible?

      • joseph_michaud's avatar
        joseph_michaud
        Moderator

        I don't see this issue when I try it with 11.31 on my machine, using a TestedApp in Simple mode.  I do see something like it when I specify Debug mode.

         

        Regardless, speak with Customer Support to address the issue with 11.31.