Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
sujala Absent Member.
Absent Member.

Sys_GetEnv("PROGRAMFILES") function returning C:\Program Files

When we run Sys_GetEnv("PROGRAMFILES")  on SilkTest 15.5 ,it is returning C:\Program Files (x86)

where as the same function when i tried to execute on 19.5 ,it is returning C:\Program Files

Why is it so?

Our application is a 32 bit application and it is under C:\Program Files (x86) and we are using this function to  get the path of few files


Please help


1 Reply
Matthias Steinkogler Absent Member.
Absent Member.

RE: Sys_GetEnv("PROGRAMFILES") function returning C:\Program Files


This happens because the Open Agent is now running on a 64bit JVM. As SYS_GetEnv(...) is - in the last consequence - run on the OA, and the OA will call then call the Windows system functions (via Java), it will return the 64bit environment variables in which it is run. Please use "PROGRAMFILES(x86)" instead to retrieve the 32bit path to "Program Files (x86)".

Kind regards,
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.