Modify bash shell script so it runs in elevated admin mode on Win explorer double click?
Brian Inglis
Brian.Inglis@SystematicSW.ab.ca
Fri Apr 11 23:40:02 GMT 2025
On 2025-04-11 10:46, Mark Liam Brown via Cygwin wrote:
> On Fri, Apr 11, 2025 at 6:32 PM Brian Inglis via Cygwin
> <cygwin@cygwin.com> wrote:
>>
>> On 2025-04-11 10:21, Mark Liam Brown via Cygwin wrote:
>>> Greetings!
>>>
>>> How can I modify a Cygwin bash script so it runs in elevated
>>> Administrator mode when someone double-clicks it in Windows Explorer?
>>
>> Use a Run as admin shortcut?
>
> How can I create one from a Makefile or bash script with Cygwin tools?
Cygwin cygutils mkshortcut with target /proc/cygdrive/c/WINDOWS/system32/runas
args /user:ADMINISTRATOR "/bin/...sh .../script" - not clear if paths in args
are converted or not?
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retrancher but when there is no more to cut
-- Antoine de Saint-Exupéry
More information about the Cygwin
mailing list