JerryS@cat
03-21-2023, 11:01 AM
As I usually do, I searched the forum for something on this subject and didn't find anything applicable, so I'm posting my question here.
According to the SetupBuilder manual, the user's privilege level can be checked via the %_SB_INSTALLERFLAG% built-in variable using code similar to below:
If %_SB_INSTALLERFLAG% Equals "1" on Position "4" Then
Set Variable %ADMIN_RIGHTS_SWITCH% to "ON"
Else
Set Variable %ADMIN_RIGHTS_SWITCH% to "OFF"
End
According to the excerpt below (from the SetupBuilder manual), the 4th bit of the %_SB_INSTALLERFLAG% should have a value of "1" if the user running the script had administrator privileges. If not, that bit should have a value of "0". I've tried this with both user accounts that do have administrator privileges on the machine and user accounts that have ordinary user rights. In all cases, that bit has a value of "1". Is there something I'm missing here, or is this something that may have changed with later versions of Windows? Ideas?
5119
According to the SetupBuilder manual, the user's privilege level can be checked via the %_SB_INSTALLERFLAG% built-in variable using code similar to below:
If %_SB_INSTALLERFLAG% Equals "1" on Position "4" Then
Set Variable %ADMIN_RIGHTS_SWITCH% to "ON"
Else
Set Variable %ADMIN_RIGHTS_SWITCH% to "OFF"
End
According to the excerpt below (from the SetupBuilder manual), the 4th bit of the %_SB_INSTALLERFLAG% should have a value of "1" if the user running the script had administrator privileges. If not, that bit should have a value of "0". I've tried this with both user accounts that do have administrator privileges on the machine and user accounts that have ordinary user rights. In all cases, that bit has a value of "1". Is there something I'm missing here, or is this something that may have changed with later versions of Windows? Ideas?
5119