Forum Discussion

rlent's avatar
rlent
Contributor
14 years ago

Tested Apps path with Win 7 64-bit

I'm doing some testing with Windows 7 64-bit. The problem I am having is that the path to the tested app is not the same. In the 32-bit OS, it is under "C:\Program Files\", while in Windows 7 64-bit the tested app is in "C:\Program Files (x86)\". I think the long-term fix is to update each of my projects with a second tested app pointing at the alternate path. I can check to see if the OS is 64-bit, and if it is, to use the Tested App with "(x86)" in the path.



Is there a quick fix I can do to get this to run? I considered just copying over the folder into the regular Program Files folder, but I expect that would mess with where the registry expected things to be.

3 Replies


  • Hi Robert,





    You can modify the Path property for the existing TestedApps item from script:





        if (Sys.OSInfo.Windows64bit) {

            TestedApps.someApp.Path = "C:\\Program Files (x86)\\";

        }

        else {

            TestedApps.someApp.Path = "C:\\Program Files\\";

        }

        TestedApps.someApp.Run();

        ...

  • This is what I am doing now. It works, but when I run TestExecute, I am prompted at the end for whether or not I want to save the project, because it does change the path. When I am running tests in a batch, the /SilentMode takes care of this. Still, it would be nice if there was a way that this didn't try to save; I only want this changed for the current run.

  • Hi Robert,





    This is what I am doing now. It works, but when I run TestExecute, I am prompted at the end for whether or not I want to save the project, because it does change the path. When I am running tests in a batch, the /SilentMode takes care of this


    I suggest that you save the initial path into a variable before checking the OS bitness. Then, when the tested application is launched, assign the path that is stored in that variable to TestedApps.someApp.Path.