Coder Social home page Coder Social logo

elevate's Introduction

i only changed the build system to sln instead of nmake files and fixed a non-ascii printing bug.
following is the original read me file and original source

Command-Line UAC Elevation Utility
Version 1.3
<http://code.kliu.org/misc/elevate/>


Introduction
============

This utility executes a command with UAC privilege elevation.  This is useful
for working inside command prompts or with batch files.


Usage
=====

Synopsis:
  elevate [(-c | -k) [-n] [-u]] [-w] command

Options:
  -c  Launches a terminating command processor; equivalent to "cmd /c command".
  -k  Launches a persistent command processor; equivalent to "cmd /k command".
  -n  When using -c or -k, do not pushd the current directory before execution.
  -u  When using -c or -k, use Unicode; equivalent to "cmd /u".
  -w  Waits for termination; equivalent to "start /wait command".

Notes:
  Both the hyphen (e.g., -w) and slash (e.g., /w) forms of switches are valid.

  When -k is specified, command is optional.  Omitting command in this case will
  simply open an elevated command prompt.

  Normally, an elevated command processor will not honor the current directory
  of an unelevated parent process, thus potentially creating problems with
  relative paths.  To address this problem, when the -c or -k switches are used,
  elevate will issue a pushd command to the new command processor to ensure that
  it uses the current directory of its parent process.  Specifying the -n switch
  will disable this feature.

Examples:
  elevate taskmgr
  elevate -k
  elevate /w HashCheckInstall.exe
  elevate -k sfc /scannow
  elevate /c del %SystemRoot%\Temp\*.*
  elevate -c -w copy foo*.* bar


Why this utility?
=================

There are other similar utilities available; for example:
* <http://wintellect.com/cs/blogs/jrobbins/archive/2007/03/27/elevate-a-process-at-the-command-line-in-vista.aspx>
* <http://jpassing.com/2007/12/08/launch-elevated-processes-from-the-command-line/>

Features that set this utility apart from the rest:

* Correct handling of command line parameters; the command line parameters are
  passed along for execution verbatim, without being chopped up and reassembled.

* The ability to launch the command processor using /c instead of /k.

* The ability to launch the command processor in the current directory.

* Better error messages to make troubleshooting execution problems easier.

* Native C code avoids the burdensome .NET startup overhead and allows for a
  much smaller executable file size.

elevate's People

Contributors

luanvso avatar

Watchers

 avatar  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.