Archive: Get "My Documents" Path


Get "My Documents" Path
I make this web archive to display
"My Documents" folder path.
I wanna know if is right for all Windos OS.
I try it in my XP Pro and it's ok.
Thanks


Works for me too (using Windows 98 Second Edition), show "C:\Meus Documentos\"!


thanks :up:


On my Windows 98 SE system the script does not work - the message box has no message inside.

My system's registry does not have the data your script is looking for, probably because my "My Documents" folder is not "C:\My Documents".


Your computer have more than one user, pengyou?


Lobo Lunar, change HKLM to HKCU to support multi-user "My Documents". (So will work for all computers that have more than one user). This code worked for me because my computer don't have more than one user.


You were too quick for me, deguix! My computer only has one user but a password is used to log on, so perhaps that makes Windows use HKCU instead of HKLM.


Your computer have two users, one is the default (if you click cancel in the log on window), and the second that you use. The HKLM code based only work if you click cancel. So is reccomended use the HKCU. In a version of my program (Registry Changer 2), I changed HKLM to HKCU, because someone had problems with the registry (like you) and worked for everyone! And another thing, the "My Documents" folder is different for each user, if select the option to have particular My Documents. So the user .DEFAULT (the computer) have one, and the user pengyou (in example) have other.


fixed. Try it, please :)


It works!


OK. :up: , and you pengyou?


Yes, the revised version of the script works perfectly.


It is recommended you use both. First you should try HCKU and then try HKLM. This is how NSIS does this for the built-in folders.


NSIS 2 RC1 has a constant for My Documents: $DOCUMENTS.


Cool :) :up: