specialFolderPath, Microsoft Window, and 64 bits

Paul Dupuis paul at researchware.com
Tue Mar 31 12:51:13 EDT 2020


On 3/31/2020 12:12 PM, Mark Waddingham via use-livecode wrote:
> On 2020-03-31 17:07, Paul Dupuis via use-livecode wrote:
>> On 3/31/2020 8:37 AM, Paul Dupuis via use-livecode wrote:
>>> 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?
>>
>> So answering my own question, as of LC9.6.0dp3 here are all the
>> Windows paths for any given CSIDL number between 0 and 255). None
>> return the 64-bit applications folder path. I will file an enhancement
>> request.
>
> Is your app running as 32-bit?
>
> Just to note (looking at the MSDN reference you mentioned):
>
> FOLDERID_ProgramFilesX64
> This value is not supported on 32-bit operating systems. It also is 
> not supported for 32-bit applications running on 64-bit operating 
> systems. Attempting to use FOLDERID_ProgramFilesX64 in either 
> situation results in an error. See Remarks for more information.
>
> So even if we did move to FOLDERIDs it wouldn't make much difference 
> if the app is 32-bit as 32-bit apps won't return 64-bit related OS 
> paths (it seems).
>
> If the app is running as 64-bit then I think the relevant CSIDLs 
> return the right thing?
>
> Warmest Regards,
>
> Mark.
>

Okay, I was running LC960dp3 (32 bit) so I downloaded LC960dp2 (64 bit) 
[I chose dp2 only because I didn't want 32 and 64 bits of the same 
version installed in case of some unknown conflict). Reran my paths test 
and your DO get different results!

Most interestingly:
specialFolderPath(38) = C:/Program Files is the 64 bot applications folder
and
specialFolderPath(42) = C:/Program Files (x86) is teh 32 bit 
applications folder

So, if I am using LC to build a Windows 64 bit standalone that 64 bit 
standalone can get BOTH the 64 bit Programs folder path AND the 32 bit 
Program folders path to check for the presence of a 3rd party 
application that could be installed as either 32 or 64 bit.

HOWEVER, if I have built a 32-Bit LC standalone, that can not get the 
path for the 64 bit Programs folder. It can ONLY get the path for the 32 
bit Programs folder

A little disappointing. My use case remains. My app (currently 32 bit)  
needs to check if a 3rd party app is installed. That 3rd party app could 
be have either a 32 bit version or a 64 bit version installed. I would 
like to use some sort of "specialFolderPath" precisely so it a user has 
a non standard installation I get the correct paths.

In at least one actual customer instance we have - out customer is 
running our app on a Microsoft Terminal Server and users get a remote 
desktop access to the server to run our app. In this specific case, 
REGISTRY queries get the users local registery on the CLIENT, but PATH 
queries check file paths on the SERVER, so registry checks do not work 
in this case.


Folder paths for 64-bit LiveCode 960dp2
specialFolderPath("home") = C:/Users/paul
specialFolderPath("desktop") = C:/Users/paul/Desktop
specialFolderPath("documents") = C:/Users/paul/Documents
specialFolderPath("support") = C:/Users/paul/AppData/Roaming
specialFolderPath("system") = C:/Windows
specialFolderPath("start") = 
C:/Users/paul/AppData/Roaming/Microsoft/Windows/Start Menu
specialFolderPath("fonts") = C:/Windows/Fonts
specialFolderPath("temporary") = C:/Users/paul/AppData/Local/Temp
specialFolderPath("engine") = C:/Program Files/RunRev/LiveCode Business 
9.6 (dp 2)
specialFolderPath("resources") = C:/Users/paul/Desktop
specialFolderPath(0) = C:/Users/paul/Desktop
specialFolderPath(2) = 
C:/Users/paul/AppData/Roaming/Microsoft/Windows/Start Menu/Programs
specialFolderPath(5) = C:/Users/paul/Documents
specialFolderPath(6) = C:/Users/paul/Favorites
specialFolderPath(7) = 
C:/Users/paul/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Startup
specialFolderPath(8) = 
C:/Users/paul/AppData/Roaming/Microsoft/Windows/Recent
specialFolderPath(9) = 
C:/Users/paul/AppData/Roaming/Microsoft/Windows/SendTo
specialFolderPath(11) = 
C:/Users/paul/AppData/Roaming/Microsoft/Windows/Start Menu
specialFolderPath(13) = C:/Users/paul/Music
specialFolderPath(14) = C:/Users/paul/Videos
specialFolderPath(16) = C:/Users/paul/Desktop
specialFolderPath(19) = 
C:/Users/paul/AppData/Roaming/Microsoft/Windows/Network Shortcuts
specialFolderPath(20) = C:/Windows/Fonts
specialFolderPath(21) = 
C:/Users/paul/AppData/Roaming/Microsoft/Windows/Templates
specialFolderPath(22) = C:/ProgramData/Microsoft/Windows/Start Menu
specialFolderPath(23) = C:/ProgramData/Microsoft/Windows/Start Menu/Programs
specialFolderPath(24) = C:/ProgramData/Microsoft/Windows/Start 
Menu/Programs/StartUp
specialFolderPath(25) = C:/Users/Public/Desktop
specialFolderPath(26) = C:/Users/paul/AppData/Roaming
specialFolderPath(27) = 
C:/Users/paul/AppData/Roaming/Microsoft/Windows/Printer Shortcuts
specialFolderPath(28) = C:/Users/paul/AppData/Local
specialFolderPath(29) = 
C:/Users/paul/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Startup
specialFolderPath(30) = C:/ProgramData/Microsoft/Windows/Start 
Menu/Programs/StartUp
specialFolderPath(31) = C:/Users/paul/Favorites
specialFolderPath(32) = 
C:/Users/paul/AppData/Local/Microsoft/Windows/INetCache
specialFolderPath(33) = 
C:/Users/paul/AppData/Local/Microsoft/Windows/INetCookies
specialFolderPath(34) = 
C:/Users/paul/AppData/Local/Microsoft/Windows/History
specialFolderPath(35) = C:/ProgramData
specialFolderPath(36) = C:/Windows
specialFolderPath(37) = C:/Windows/System32
specialFolderPath(38) = C:/Program Files
specialFolderPath(39) = C:/Users/paul/Pictures
specialFolderPath(40) = C:/Users/paul
specialFolderPath(41) = C:/Windows/SysWOW64
specialFolderPath(42) = C:/Program Files (x86)
specialFolderPath(43) = C:/Program Files/Common Files
specialFolderPath(44) = C:/Program Files (x86)/Common Files
specialFolderPath(45) = C:/ProgramData/Microsoft/Windows/Templates
specialFolderPath(46) = C:/Users/Public/Documents
specialFolderPath(47) = C:/ProgramData/Microsoft/Windows/Start 
Menu/Programs/Administrative Tools
specialFolderPath(48) = 
C:/Users/paul/AppData/Roaming/Microsoft/Windows/Start 
Menu/Programs/Administrative Tools
specialFolderPath(53) = C:/Users/Public/Music
specialFolderPath(54) = C:/Users/Public/Pictures
specialFolderPath(55) = C:/Users/Public/Videos
specialFolderPath(56) = C:/Windows/Resources
specialFolderPath(59) = 
C:/Users/paul/AppData/Local/Microsoft/Windows/Burn/Burn





More information about the use-livecode mailing list