specialFolderPath, Microsoft Window, and 64 bits
Paul Dupuis
paul at researchware.com
Tue Mar 31 08:37:26 EDT 2020
On Windows, the SpecialFolderPath function can use Constant Special Item
ID List (CSIDL) values, but since Windows Vista, developer were supposed
to switch to using the Microsoft Known Folder ID system instead (I just
learned this, so there's that!) (see
https://docs.microsoft.com/en-us/windows/win32/shell/knownfolderid)
Under CSIDL, specialFolderPath("38") is the equivalent of
CSIDL_PROGRAM_FILES or C:\Program Files\ on older systems or C:\Program
Files (x86)\ on Windows 8 or 10 (for 32 bit apps)
Under KNOWNFOLDERID, this is FOLDERID_ProgramFiles and there is a
seconds KNOWNFOLDERID, FOLDERID_ProgramFilesX64 that on 64 bit Window 8
and 10 gets you the 64 bit app installation folder, typically C:\Program
Files\
Under LiveCode 9.x.x (up to 9.6.0dp3) I can see no way to obtain the
64bit application installation folder using SpecialFolderPath? Does
anyone know if this is correct or am I missing something?
And does anyone know if LC plans to update the specialFolderPath
function on Windows to use KNOWNFOLDERID? Or if it currently uses
KNOWNFOLDERID (for all I know).
My use case is that I need to check both the 32 bit app installation
folder and the 64 bit app installation folder to see if a particular app
is installed (either the 32 or 64 bit version could be present) and I
would rather NOT hard code the paths since we do run into non-standard
installations among our customer base.
More information about the use-livecode
mailing list