I want to install MSI package under user level and set several registry keys under HKLM. The second require admin level and I can done it by using NSIS::UAC plugin. But I need a way to notify InnerInstance (with admin level privilegies) about what checkboxes user selected. There are the following possible ways to exchange such information (just 1 or 0)
no success, APPDATA is different and COMMONAPPDATA require admin level, TMP is not also an option, because it depends on profile name
no success, variables didn't exists. BTW even if I run simple console, set variable and run other console - I didn't see variable
Suppose that it is too complex for simple installation issue, but will choose it if no other option will be available
!macro _SyncVariable _variable
!define Lprefix L${LINE}
push $R0
goto _SyncVariableInner${Lprefix}
_SyncVariableOuter${Lprefix}:
StrCpy $R0 ${_variable}
return
_SyncVariableInner${Lprefix}:
!insertmacro UAC_AsUser_Call Label _SyncVariableOuter${Lprefix} ${UAC_SYNCREGISTERS}
StrCpy ${_variable} $R0
!undef Lprefix
pop $R0
!macroend
!define SyncVariable !insertmacro _SyncVariable
it suppose to work, but didn't
So, can someone help me with links, thoughts?
There is no official Unicode build of NSIS, there is a forked project but the UAC plugin is not supported in this configuration and therefore does not provide a compiled DLL for it (You might be able to get a compiled version if you ask in the NSIS IRC channel).
This kind of hybrid installer is hard to get right and should not be done IMHO. If you use the Access Control plugin to give all users write access to $windir\temp\{yourguid}
or HKLM\Software\{yourguid}
you might be able to exchange the information but this is also a potential security hole. The same problem exists with named global kernel objects (Semaphore, memory maps etc)