Forum Discussion

hrothrock's avatar
hrothrock
Contributor
5 years ago
Solved

tested app is not using the working folder

I use TestComplete to test web applications, but we are converting from a legacy Windows product. I need to write a test that opens our legacy program (among other things). I have added the legacy program as a tested app where the application path leads to the legacy program's main exe file. I have no command line parameters. The Working Folder is pointed to where the data has been restored (SQL database). When I run the tested app, I get the message "The start in directory 'C:\Windows' is invalid." When I look at the start in input of the properties for the legacy program's icon, it is pointing to the working folder that I set up in the tested app. If my manager does the same thing, it seems to be running correctly for him. I have looked through all the options and current project properties and I can't find anything to explain why I am getting this message. Please help and thanks in advance!

  • OK, so, a number of things come to light.

     

    1) Your working directory is on a mapped drive (Y).  While you, as a user, may have the drive mapped, if you're running TestComplete as an administrator, that drive mapping may not translate.

    2) Drive mapping I've found to be rather interesting, sometimes, when working with different kinds of applications.  The drive may be mapped just fine in Windows but if you open up a command prompt, it may not be mapped.  Windows does that sometimes and it's VERY annoying.

     

    Recommendation:

     

    Change the working directory to be the full network path (\\<servername>\<sharename>\<folder tree>\)  OR

    Restore the working data to a local C drive directory instead and have your tested app point to that local drive location.

6 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    I'm not sure I understand what you mean by the working folder is set to an SQL database restore?  Working folder should be a drive folder somewhere.  Without a proper working folder, it cannot run the app properly.

    Additionally, the user that you're logged into windows under, if it doesn't have the rights/privilege for that working folder, that may also give you an error.

    • hrothrock's avatar
      hrothrock
      Contributor

      I was trying to say that the database is SQL. In order to open the database it has to be restored to a particular location. The working folder is pointed to that location, not to the program files exe.

       

      I had already added the 'Everyone' group to the security permissions and set that to full control.

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Can you share screenshots, please, of the app configuration?

         

        Also, share either the script code you're executing or the Keyword test steps you're attempting to execute.