PDA

View Full Version : How to get pathes to some Shell folders?


mangomel
11-27-2006, 01:43 PM
How to get drive letter where Windows is installed?

How to get path to user folder settings? (I mean C:\Documents and settings\user\). It's needed to get f.e. to the Documents and settings\user\Local settings\Application data - actually it's a hidden folder (not Documents and settings\user\Application data).

M@ngomel

jfxwave
11-27-2006, 01:59 PM
Go into AutoPlay Help and type in "Global variables" or "Shell.GetFolder"

I think thats what your looking for.

jfxwave
11-27-2006, 02:30 PM
I think i see what your looking for..

One way i know of is get the path in the registry

rPath = Registry.GetValue(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Expl orer\\Shell Folders", "Local AppData", true);

if you look in the registry there are alot of paths in "Shell Folders" just in case you need another one. Remember that it will return a single \