Archive: Temp path problem with UAC Plugin

Temp path problem with UAC Plugin
I am using the UAC plugin, I am testing with W7. My installer needs to drop a file on windows temp folder and execute it as user so I have something like this:

        SetOutPath $Temp
File "build.exe"
!insertmacro UAC_AsUser_ExecShell "" "$Temp\build.exe" "" "" ""

The problem is that the build.exe file is not being executed, it works if I use $DESKTOP or any other folder that wont change depending on the user level. So I suspect the error is that, the file build.exe is being dropped in C:\Users\admin\AppData\Local\Temp (i can confirm this browsing the folder), and UAC_AsUser_ExecShell tries to execute it on C:\Users\normaluser\AppData\Local\Temp (i cant confirm this but i dont know what else could cause the file to not execute)

I don't want to drop the files on the desktop or some folder like that, i wanted to use temp because I dont want to delete the file since i wont know when it ends the execution and didnt want to handle that.

Is there any solution to this?

I think you can use:

StrCpy $R0 "$Temp\build.exe"
!insertmacro UAC_AsUser_ExecShell "" "$R0" "" "" ""

Thanks that makes sense, ill try to test it tonight. I was trying to use the uac.dll from the git repo which seems to be a more updated version, with this dll i am now using UAC::GetShellFolderPath but I found that there's no CSIDL_ for the temp folder.

Yes, $temp comes from %temp% so it is a bit special...