Giter Club home page Giter Club logo

setexetorunasadmin's Introduction

ko-fi

SetExeToRunAsAdmin

SetExeToRunAsAdmin is a script that lets you manage administrator privileges for EXE files. You can specify the path of the EXE file using the -Path parameter. You can also set multiple EXE files to use wildcards to specify multiple files. Additionally, you can choose to modify the administrator setting for the current user or all users on the system using the -CurrentUser and -AllUsers parameters. To undo the administrator setting, use the -UnsetInstead parameter.

Install

On any Windows machine, open PowerShell as Administrator and type...

Install-Script SetExeToRunAsAdmin

and accept the prompts.

This script is published on PowerShell Gallery.

The code is signed, so if you want to change it, just removed the # SIG # Begin signature block line and everything beneath it.

Usage

SetExeToRunAsAdmin -Path <exe path/pattern> (-CurrentUser | -AllUsers | -UnsetInstead | -RegJump)

Arguments

Parameter Description Required
-Path The path of the EXE or pattern to match Yes, unless using the RegJump switch
-CurrentUser Set for the current user (default) No
-AllUsers Set for all users No
-UnsetInstead Unset No
-RegJump Use RegJump to jump to the app registry key No

Examples

Set EXE to run as Administrator

SetExeToRunAsAdmin -Path "C:\Shared\example.exe"

Unset EXE to run as Administrator

SetExeToRunAsAdmin -Path "C:\Shared\example.exe" -UnsetInstead

Set multiple EXEs to run as Administrator

SetExeToRunAsAdmin -Path "C:\Shared\*.exe"

Unset multiple EXEs to run as Administrator

SetExeToRunAsAdmin -Path "C:\Shared\*.exe" -UnsetInstead

Jump to user's run as Administrator registry key

SetExeToRunAsAdmin -RegJump

Jump to current user's run as Administrator registry key

SetExeToRunAsAdmin -CurrentUser -RegJump

Jump to all users' run as Administrator registry key

SetExeToRunAsAdmin -AllUsers -RegJump

setexetorunasadmin's People

Contributors

asheroto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

dmgolembiowski

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.