Subject: Re: Finding Desktop directory in Windows NT? - DN [1]
"drow" <drow@elves.org> - 22 Oct 1999 - comp.lang.tcl
############################################################################
#####
On my Windows98 the Registry path is :
{HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ProfileList}
############################################################################
#####
Martin Lemburg <martin.lemburg@bigfoot.de> wrote in message
news:tYlJ3.291$Is.10420@news.tli.de...
Hi,
there is a relative simple way to get those informations ... from the
registry!
Here an code example to get all shell folders (desktop, recent, ...):
%package require registry
%
%set shellFoldersKey
{HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell
Folders}
############################################################################
#####
On my Windows98 the Registry path is :
{HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ProfileList}
############################################################################
#####
%
%foreach name [registry values $shellFoldersKey] {
% set shellFolders($name) [registry get $shellFoldersKey $name]
%}
%
%set userShellFoldersKey
{HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User
Shell Folders}
############################################################################
#####
On my Windows98 the Registry path is :
{HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ProfileList}
############################################################################
#####
%
%foreach name [registry values $shellFoldersKey] {
% set userShellFolders($name) [registry get $userShellFoldersKey $name]
%}
This example changes nothing inside the registry. It only requests the
foldernames and it should work on Windows9x and NT.
But be CAREFULL when using the registry commands "delete" or "set". With
this commands you could change the registry and damage your system!
Bye
Martin
--
Mike Gretzinger schrieb in Nachricht <37F2739A.FC4C8AEC@colcom.com>...
>Need to find the "desktop" directory for the current logged on user.
>
>I believe there is a Windows variable called "%USERPROFILE%" that has
>this information. For example "%USERPROFILE%\Desktop" is the current
>users desktop directory. I've tried to feed tk_getSaveFile this
>information, but it dosn't work.
>
>Thanks for the help.
>
>Gretz
>
Last modified
1999-11-04
1999-11-04
(195.108.246.50)
Note: you are looking at
the snapshot of an old wiki
- much of this information
is likely to be very outdated
