Reply to Thread

Post a reply to the thread: Checking User's rights?

Your Message

Click here to log in

What's the name of our main installation product (in uppercase letters), directly followed by the current year?

 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Topic Review (Newest First)

  • 03-22-2023, 02:02 PM
    JerryS@cat

    Re: Checking User's rights?

    Friedrich:

    You've answered my question. Thank you.
  • 03-22-2023, 11:33 AM
    linder

    Re: Checking User's rights?

    Jerry,

    BTW, please use "Get System Information" -> "Installer Elevation Type". This lets you determine whether a User is a Member of the Administrators Group with UAC Enabled.

    Does this help?

    Friedrich
  • 03-22-2023, 11:25 AM
    linder

    Re: Checking User's rights?

    Hi Jerry,

    this if for pre-UAC aware systems only (or if UAC is completely disabled). In modern UAC environments, the installer always has admin rights if it is running elevated (e.g. "requireAdministrator" manifested). Do you have your installer running "asInvoker" (that means: per-user)?

    Friedrich
  • 03-21-2023, 11:01 AM
    JerryS@cat

    Checking User's rights?

    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?

    Attachment 5119

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •