Links to programs in Windows?

Florian von Walter fvwalter at web.de
Tue Feb 2 13:45:31 EST 2010


Kresten,

it is not sufficient to search through "C:\Documents and Settings\All
Users\Start Menu\Programs".

Many program links are created under "C:\Documents and
Settings\<User>\Start Menu" and "C:\Documents and Settings\<User>\Start
Menu\Programs".
Also "C:\Documents and Settings" doesn't always have to be there. This
can change when a power user moves user profiles away from the standard
directory.
It can also change between Windows versions. It changed with Windows 7
where "C:\Documents and Settings" doesn't exist anymore. It is now at
"C:\Users". "C:\Documents and Settings" under Windows 7 is just a link
to "C:\Users" now.

The official and correct way to determine where these profile folders
are is to read the Windows registry values at:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell
Folders\Start Menu
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell
Folders\Programs
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\Shell
Folders\Common Start Menu
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\Shell
Folders\Common Programs

and scan *all* paths.

In addition to that the correct way to determine the programs folder
("C:\Program Files" by default) is to read the registry key values at:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ProgramFilesDir

64bit versions of Windows have at least two "Program Files" directories.

Note the other values at:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell
Folders
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\Shell
Folders
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion

which point to other important Windows directories like "My Documents",
"My Pictures" etc.

Hope this helps.

Regards, Florian


On 02.02.2010 13:40, Kresten Bjerg wrote:
> Creating links to any program on Windows
>
> We have been experimenting to script a handler, which can permit windows
> users to select an arbitrary program (to create a link button)
>
> Linking to the "Program Files" folder is easy, but novice user gets lost
> in the chaos there.
>
> We have worked to script having users select through the ../Start
> Menu/Programs folder, but here only a small selection of the many
> files/aliases comes up, in contrast to what is seen when you manually
> open that folder via the start menu,- or work your way down the
> directories /C:\Documents and Settings\All Users\Start Menu\Programs.
>
> Does anybody have an explanation ?  A solution ? 
>
> set the systemFileSelector to false does not help, has same meagre
> result.
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>   



More information about the use-livecode mailing list