
Active Member
  
Group: Members
Posts: 41
Member No.: 34
Joined: 25-May 04

|
Hi, I am looking for a way to find out the path to a users Program Files folder. I know the SHGetSpecialFolderPath API (or SHGetFolderPath for Win 2000 or later) using the CSIDL 'CSIDL_PROGRAM_FILES' will get this but the problem is I can't guarantee users will have shell32.dll version 5.0 or later installed. I know if they have Internet Explorer 5.0 or later running they will have the requisite version of this dll but if they don't....
I am thinking about simply checking a registry key (which is no doubt what the shell programs do anyway). On Win 2000 the key is: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\ProgramFilesDir
However I don't whether this is consistent across various Windows versions. Any ideas much appreciated. Cheers, Andrew
|