Opened 11 years ago

Closed 8 years ago

#322 closed enhancement (worksforme)

Command line ability to escalate to admin priviliges

Reported by: maphew Owned by: maphew
Priority: major Component: Package
Version: Keywords: shell
Cc:

Description

I'd like to add the command line elevate utility to osgeo4w. Elevate "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".

The most logical place to add this is as a sub package to pkg-shell, or perhaps just inside shell.

Any comments?

Change History (2)

comment:1 by jef, 10 years ago

The nircmd package also has that ability. Eg.

nircmd elevate "%WINDIR%\regedit" /s "%O4W_ROOT%\apps\qgis-dev\bin\qgis.reg"

comment:2 by jef, 8 years ago

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.