Forum Discussion

markus_humm's avatar
markus_humm
Occasional Contributor
14 years ago

TestedApps path differs between 32 bit and 64 bit Windows version

Hello,



I'd like to install the application to be tested to its default path. With Windows XP this is a subfolder of c:\program files.

With 64 Bit Windows 7 the application automatically gets installed to a subfolder of c:\program files (x86).



I've read now that I can change the File Path but I'm not sure how to do it in such a automatic way that the same projects can run unmodified on all computers. The thing with project and project suite variables I didn't yet understand completely. So has anybody any ideas? For instance if I could determine the correct path I might perhaps change the path to the tested file at runtime?



Greetings



Markus
  • Anonymous's avatar
    Anonymous
    Hello Markus,



    You can use the script below:





    function GetProgramFilesPath()


    {


     var os32bit, os64bit, Path


     os32bit = aqEnvironment.GetEnvironmentVariable("ProgramFiles");


     os64bit= aqEnvironment.GetEnvironmentVariable("ProgramFiles", true);



     if (Sys.OSInfo.Windows64bit)


      Path = os64bit; 


     else


      Path = os32bit;



     return Path; 


    }





    Please refer to the OSInfo.Windows64bit and aqEnvironment.GetEnvironmentVariable articles to learn more about the methods used in the code.