@Thaddy, thanks for your explanation, I do understand what you are saying, but this does not cover the issue that running the app in the IDE fails, and running directly it works ok.
@rvk
ShowMessage(GetWindowsSpecialDir(CSIDL_PERSONAL));
Return no information when run in the IDE, but shows correctly when launched directly.
I have just created a new user with administrator rights, and this also is doing the same, test system win 7 64 ultimate, lazarus 32 bit, creating 32 bit application.