Archive: $AppDATA in Vista for standard user


$AppDATA in Vista for standard user
Hi, please help

Im trying to retreive the $appdata for a standard user in Vista. Every time the installer returns the admin user appdata.

The following works fine in WinXP but not in Vista if the user is standard user.
------
MessageBox MB_OK "APPDATA=$APPDATA"
ReadRegStr $1 HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "AppData"
MessageBox MB_OK "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders $\n $1"
ReadEnvStr $0 USERPROFILE
MessageBox MB_OK "ReadEnvStr USERPROFILE=$0"
System::Call "advapi32::GetUserName(t .r0, *i ${NSIS_MAX_STRLEN} r1) i.r2"
MessageBox MB_OK "user Name from System Call=$0"
------
Is there a way in NSIS to retreive the APPDATA of standard user in Vista?

Thank you for a quick reply


That's probably because the installer got elevated into the administrator's level. You could use `RequestExecutionLevel user`, but then you won't have any administrator privileges.


I have tried all the RequestExecutionLevel level one by one... still the same. Even if the installer needs admin rights why Vista keep sending another user profile instead of the current one.
Is there another way in NSIS to retreive the APPDATA of standard user in Vista?

Thank you


Reading the registry value for HKCU should work. Doesn't it? Could you post the result of the script for each of the RequestExecutionLevel values?