Archive: WriteRegExpandStr issue in vista


WriteRegExpandStr issue in vista
hello
Im using Qgis-release-installer.nsi to compile a setup.exe. The setup.exe which was created works fine in Windows XP ,but in Vista it throws an error as "The System could not find path" it is because the Environment variable could not be set in Vista. So the changes may be in the nsis script as the commands present to declare Registry are

!define env_hklm 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'

!define env_hkcu 'HKCU "Environment"'

; set OSGEO variable
WriteRegExpandStr ${env_hklm} OSGEO4W_ROOT "$INSTDIR"

Could anyone please help me to clarify whether the code has to be changed or it might be other issue?

Regards
Sunil


You need to be admin to write to HKLM, are you sure you are admin? (RequestExecutionLevel + UserInfo plugin)