Coder Social home page Coder Social logo

811alex / elevateme Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 14 KB

Simple VBScript to execute code/apps with elevated privileges in Windows.

License: Creative Commons Zero v1.0 Universal

Visual Basic 72.40% Batchfile 27.60%
uac windows vbscript privilege-elevation script tool

elevateme's Introduction

ElevateMe

The purpose of this script is to execute things with elevated privileges in systems running Windows. You can use it to automatically make your code run with elevated privileges, without using something like the compatibility properties of an executable, so if that's what you're looking for, you probably found it. Make no mistake, this is NOT supposed to be some kind of exploit, it will still prompt the user on a system with UAC.

License: cc0, version 1.0 (basically, do as you please and if you somehow manage to fry your pc using this, it's not my fault).

You only need elevateMe.vbs, but I've also uploaded a simple batch file (test.bat), that you can use to test it first, if you'd like.

The script can be used in two ways:

  • you can execute it and give it as an argument a different executable (with any arguments needed on the side)
  • or you can write your code inside the script, if it can be expressed in VBScript

Executing through arguments

The batch disables and re-enables the "TabletInputService" service, because it's totally a great service that never makes certain apps crash on windows 10 all the time if you have a graphics tablet connected. :)

That's just an example. An operation you can only do with elevated privileges.

If you execute it directly, through a normal user, you'll notice that it will fail, saying "Access is denied."

You can execute it through elevateMe.vbs by running the command elevateMe.vbs test.bat (which should succeed).

Again, just an example, there are many ways to use the script.

You can also pass arguments by simply typing them next to it, like so: elevateMe.vbs test.bat hello world

Executing inside script

If you'd much rather make a single file that executes some code with privileges, you can instead insert your own VBScript code, inside elevateMe.vbs, in the designated area.

For example, to disable the "TabletInputService" service, like in the batch file, you'd type: objShell.ShellExecute "sc","config TabletInputService start=disabled

Have a good one!

elevateme's People

Contributors

811alex avatar

Watchers

 avatar

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.