Run as Administrator in Windows 10  

Page 6 of 6 FirstFirst ... 456

  1. Posts : 230
    Pro 20H2
       #50

    My questions are about scripts, not about opening a command prompt console.
    Assume the following:
    - local computer
    - a .cmd script
    - owned by user Administrators
    - file permissions Full for Administrators and for System; inheritance disabled
    - executed manually by a current user of type Administrators

    Question 1)
    Does the script necessarily run as administrator by virtue of its execution by a user of type Administrators?

    Question 2)
    In a script that is run as administrator,
    do all processes that are invoked
    run as administrator?
      My Computer


  2. Posts : 61,457
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #51

    thename said:
    My questions are about scripts, not about opening a command prompt console.
    Assume the following:
    - local computer
    - a .cmd script
    - owned by user Administrators
    - file permissions Full for Administrators and for System; inheritance disabled
    - executed manually by a current user of type Administrators

    Question 1)
    Does the script necessarily run as administrator by virtue of its execution by a user of type Administrators?

    Question 2)
    In a script that is run as administrator,
    do all processes that are invoked
    run as administrator?
    Hello mate,

    Q1) No. Only the built-in "Administrator" will have everything "Run as administrator" (elevated rights) by default. All other accounts (administrator or standard user) will have to right click > Run as administrator to run elevated.

    Q2) Correct. When you run a script elevated, all commands in the script will run elevated.
      My Computers


  3. Posts : 230
    Pro 20H2
       #52

    About the thumb upwards "Thank" button at the bottom of posters' entries: What happens as result of a reader's performing the Thank; i.e. is it put to the poster's attention in some way?
      My Computer


  4. Posts : 61,457
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #53

    thename said:
    About the thumb upwards "Thank" button at the bottom of posters' entries: What happens as result of a reader's performing the Thank; i.e. is it put to the poster's attention in some way?
    When you use the Thank button, it give the member rep points and a notification of the thank you.

    Reputation and Badges [3]
      My Computers


  5. Posts : 230
    Pro 20H2
       #54

    I would like Option One of this tutorial to work. What are your thoughts about why it does not run as admin a selected program. Instead, it runs not as admin, same as when not applying the key combination.
      My Computer


  6. Posts : 61,457
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #55

    thename said:
    I would like Option One of this tutorial to work. What are your thoughts about why it does not run as admin a selected program. Instead, it runs not as admin, same as when not applying the key combination.
    Odd. Does the app run as admin when using the usual option 2?
      My Computers


  7. Posts : 230
    Pro 20H2
       #56

    Oh yes, reliably, with all the many other ways that I do it.

    I know that the key combination per se is functional, because I use it frequently for other things.
      My Computer


  8. Posts : 61,457
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #57

    thename said:
    Oh yes, reliably, with all the many other ways that I do it.

    I know that the key combination per se is functional, because I use it frequently for other things.
    I'm not sure why option 1 doesn't work for you then.

    I do usually have to click on the selected app while holding Ctrl+Shift though.
      My Computers


  9. Posts : 230
    Pro 20H2
       #58

    Behavior same with non-script program. I chose cmd.exe because its window title indicates "Administrator" when true.
    Run as Administrator in Windows 10-ctrlshift.jpg

    By the way, I have tried all four of the possible Ctrl Shift combinations that are available owing to the duplication of those keys on the keyboard.

    Behavior same in a 20H2 VM in this computer;
    and same in a different 20H2 computer that I remotely controlled.

    In WinPE, title bar
    [of a cmd.exe window that I open via an Open File dialogue]
    contains "Administrator" both
    when I run as admin (rightclick menu), and
    when I open without any run as admin.

    At next opportunity I will use directly a different computer.

    ----------
    Ok, I went to an office. Behavior same in that computer (20H2).
    Last edited by thename; 10 Jun 2021 at 13:29.
      My Computer


 

Tutorial Categories

Run as Administrator in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 05:01.
Find Us




Windows 10 Forums