I found this example of how to get the error level of an uninstaller by simulating the TEMP file copy like so:
What I don't understand is the purpose for the "_?=$INSTDIR" in the command line (shown in red above). I've searched the manual and the forums but haven't found anything on this. Can someone please elaborate? 😕
CopyFiles $INSTDIR\uninstaller.exe $TEMP
ExecWait '"$TEMP\uninstaller.exe" _?=$INSTDIR' $0
DetailPrint "uninstaller set error level $0"