Now, myself being a Systems administrator, I would be extremely doubtful of using the "simple" method of querying the registry. API calls are there for a reason.
I don't know how easy the registry is to rebuild on W2K, since i haven't had to do it yet (crosses fingers), but the less playing around with it, the less chance of it bustificating. (word of the day). MK ----- Original Message ----- From: "Paul Jansen" <[EMAIL PROTECTED]> To: "Perl-Win32-Users (E-mail)" <[EMAIL PROTECTED]> Sent: Saturday, June 01, 2002 11:19 AM Subject: RE: Determining Default 'My Documents' folder path > I'm suprised that no-one has mentioned this yet but In > windows 2000 group policies (there are also other ways > to do this) you can use 'folder redirection' to > redirect special folder such as 'my documents' to > another location. ou don't have to use a server based > profile (ie: roaming) to do this. Because of this the > solution proposed that you just append 'my documents' > to the userprofile environment variable location will > not always work. It's always safer to pull the > location from the registry in a way that has already > been mentioned. I think using an API call is overkill > personally. > HTH > PJ > > --- Conor Lillis <[EMAIL PROTECTED]> wrote: > Why not > pull it from the environmental variables, > > and append "My documents" > > to the userprofile value ? > > To view environment variables, type SET at a command > > line. This method > > should work in all cases, as MS create these folders > > as default for any new > > user that logs into a PC. > > > > This code will list all environment variables on > > your local PC. > > > > foreach $key (sort keys(%ENV)) { > > print "$key = $ENV{$key}\n"; > > } > > > > HTH > > > > Conor > > > > > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]] > > Sent: 30 May 2002 17:43 > > To: Adam Frielink > > Cc: Perl-Win32-Users (E-mail) > > Subject: Re: Determining Default 'My Documents' > > folder path > > > > > > > > On 30/05/2002 15:24:40 perl-win32-users-admin wrote: > > > > >I have been looking for a way to determine the path > > of the 'My Documents' > > >folder for a PC. I assume this is a registry > > setting. I did a search for > > >this through MY registry and the only potential > > references I can find > > refer > > >to a shell32.dll,9227. I don't have a clue as to > > what that means. > > > > > > > Forget that. For Windows 2000, look in the registry > > under > > > > > HKCU/Software/Microsoft/Windows/CurrentVersion/Explorer/Shell > > Folders > > ^^^^- HKEY_CURRENT_USER (there's a space character > > there)---^ > > > > You'll find entries for "Administrative Tools", > > "Desktop", > > "Favourites", "Start Menu", etc. > > Look for either "My Documents" or "Personal". > > > > -- > > Csaba Ráduly, Software Engineer > > Sophos Anti-Virus > > email: [EMAIL PROTECTED] > > http://www.sophos.com > > US Support: +1 888 SOPHOS 9 UK > > Support: +44 1235 559933 > > http://www.sold.com.au - The Sold.com.au Big Brand Sale > - New PCs, notebooks, digital cameras, phones and more ... Sale ends June 12 > _______________________________________________ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > > _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs