This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: scripting elevated privilege on Windows 7


Thank you Robert Pendell! I wrote this shell script. Any suggestions
for optimization?

#!/bin/bash
if [ $# -eq 1 ]
then
        echo "Usage: elev program arg1 arg2 ..."
        exit 1
fi
prog="$1"
shift
exec cygstart --action=runas `which "$prog"` "$@"


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]