Windows 10: Run as administrator - Add to PS1 File Context Menu in Windows 10  

    Run as administrator - Add to PS1 File Context Menu in Windows 10

    Run as administrator - Add to PS1 File Context Menu in Windows 10

    How to Add 'Run as administrator' to PS1 File Context Menu in Windows 10
    Published by Category: Customization
    17 Jul 2018
    Designer Media Ltd

    Published by


    Brink's Avatar
    Administrator

    Posts: 30,675

    Show Printable Version 


    How to Add 'Run as administrator' to PS1 File Context Menu in Windows 10


    Some legitimate applications require a full administrator access token (elevated) to perform their functions or tasks. For example, when a program that you are trying to run is giving you a Access Denied or No Permission type error.

    When you right click on application files, you can use the Run as administrator context menu item to run the app with elevated rights (full administrator access token).

    This tutorial will show you how to add or remove Run as administrator from the context menu of PowerShell .ps1 files for all users in Windows 10.

    You must be signed in as an administrator to be able to add or remove this context menu.


    EXAMPLE: "Run as administrator" in context menu of PS1 files
    Name:  PS1_Run_as_administrator.png
Views: 4748
Size:  224.3 KB



    Here's How:

    1. Do step 2 (add) or step 3 (remove) below for what you would like to do.


     2. To Add "Run as administrator" to PS1 file Context Menu

    A) Click/tap on the Download button below to download the file below, and go to step 4 below.

    Add_PS1_Run_as_administrator.reg

    download


     3. To Remove "Run as administrator" from PS1 file Context Menu

    This is the default setting.

    A) Click/tap on the Download button below to download the file below, and go to step 4 below.

    Remove_PS1_Run_as_administrator.reg

    download

    4. Save the .reg file to your desktop.

    5. Double click/tap on the downloaded .reg file to merge it.

    6. When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

    7. You can now delete the downloaded .reg file if you like.


    That's it,
    Shawn


  1.    03 Jul 2017 #1

    First off, thank you! This is one of the best reg edits!

    I was trying to convert this.reg to use in a .bat using http://www.sordum.org/8478/reg-converter-v1-0/

    But it doesn't quite work. any tips for getting this to work in a .bat?

    again thank you!
      My ComputerSystem Spec


  2. Posts : 30,675
    64-bit Windows 10 Pro build 17713
    Thread Starter
       03 Jul 2017 #2

    Hello treeman, :)

    Yeah, the PowerShell wrapper in it would put a damper on that.
      My ComputersSystem Spec

  3.    2 Days Ago #3

    Awesome reg file. Could you possibly make a context menu to Edit with PowerShell ISE as Admin?
    I found this, but I can't seem to get it to work Adding to the context menu | Tech thoughts
      My ComputerSystem Spec


  4. Posts : 30,675
    64-bit Windows 10 Pro build 17713
    Thread Starter
       2 Days Ago #4

    Hello @michaeljt, and welcome to Ten Forums.

    I'll be happy to take a look to see what I may be able to come up with.

    For now, you could use "Open with" > "Choose another app" for this. You can select to "Open with" the %windir%\system32\WindowsPowerShell\v1.0\PowerShell_ISE.exe file with the "Always use this app" box unchecked.

    This way "Windows PowerShell ISE" will be added to the "Open with" context menu of the file type (ex: ".ps1") like below.

    It's not run as admin though.

    Name:  Open_with.jpg
Views: 92
Size:  49.0 KB
      My ComputersSystem Spec

  5.    2 Days Ago #5

    Hello Brink and thank you. If you do ever find a way for Edit as Administrator that would be great.
      My ComputerSystem Spec

  6.   My ComputersSystem Spec


 

Tutorial Categories

Run as administrator - Add to PS1 File Context Menu 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 Xbox Windows Phone


Related Threads
How to Add Windows Batch File to New Context Menu in Windows 10 A .bat file is a batch file that consists of a series of commands to be executed by the command line interpreter, stored in a plain text file. The New context menu allows users...
.Reg files are registration entries that are text-based human-readable files for exporting and importing portions of the Registry. The New context menu allows users to quickly create new files, folders, and shortcuts. You can right click or press...
How to Add or Remove 'Run as administrator' Context Menu in Windows 10 Some legitimate applications require a full administrator access token (elevated) to perform their functions or tasks. For example, when a program that you are trying to run...
How to Add 'Run as administrator' to MSI File Context Menu in Windows 10 Some legitimate applications require a full administrator access token (elevated) to perform their functions or tasks. For example, when a program that you are trying to run...
How to Add 'Run as administrator' to VBS File Context Menu in Windows 10 Some legitimate applications require a full administrator access token (elevated) to perform their functions or tasks. For example, when a program that you are trying to run...
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 12:38.
Find Us