delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=Cy0JCDNLc+QiA0RISDmicLD8EdadY8ZPlhHwrkBz93Z5ZYAtbILwY | |
KTX1asc0TreGs3dmGq3KLIvh5MMB7VCS3Agxj784s6mvpmwf6Um+5zC9xRNHZGFC | |
8I5qnleSr20NhCE/fnq8IPzcT+zHs6iE6bAs1rDaornzYDqKey1LjM= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; s=default; | |
bh=SqU9l9legvTYDwfqxtPIfC9zbg4=; b=bI/TgWRt3WXDnENjA9VtBDwT4L0q | |
VascxGWm53LeUFJ76f9ZkHa2XdPB+viWi41c0iyZ/2QQ5TX6BU8r+kIr96d/zvUH | |
qQeGNMciazjY8adtIjIObVICnoc78dwbGc4Tnb3A4A/CbL1uqRIILGnUogAfvWdc | |
caAsDapHGmvWYMI= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-5.0 required=5.0 tests=AWL,BAYES_40 autolearn=ham version=3.3.2 |
X-HELO: | calimero.vinschen.de |
Date: | Mon, 12 May 2014 14:50:54 +0200 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Baffled: is it Cygwin (64-bits) or Windows that causes the invocation of regedit (from bash) to fail? |
Message-ID: | <20140512125054.GC2436@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <849f1f5420ebf77d7a591d6c9b6bfa4b DOT squirrel AT webmail DOT xs4all DOT nl> <536E339A DOT 6030200 AT breisch DOT org> <6f9d939cc604437def11828435a67f96 DOT squirrel AT webmail DOT xs4all DOT nl> |
MIME-Version: | 1.0 |
In-Reply-To: | <6f9d939cc604437def11828435a67f96.squirrel@webmail.xs4all.nl> |
User-Agent: | Mutt/1.5.23 (2014-03-12) |
--32u276st3Jlj2kUU Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On May 12 14:20, Houder wrote: > Of course, it is not really a problem, that regedit cannot be invoked fro= m Cygwin, as it can > be invoked from the Windows interface ... >=20 > However, in some of the "harder" cases of using Gygwin, one needs to have= a "mental" model of > how Cygwin "integrates" with Windows (is my belief) ... and as far I unde= rstand the matter, I > was surprised to find that I could not invoke regedit from bash. >=20 > Consequently, I decided to investigate why I got the denial (64-bits Cygw= in) at my end. >=20 > First of all, some more info about my "environment": >=20 > - I am using Cygwin from Windows 7 ... > - I am using Cygwin from an administrative account ... > - furthermore, using secpol.msc, I have set the ConsentPromptBehaviorAdm= in field in >=20 > HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System (key in= registry) >=20 > to zero, meaning 'elevate without prompting' Doesn't matter. The problem is that elevating is a special procedure, requiring a special form of ShellExecuteEx function, which doesn't integrate well with the requirements of POSIX fork/exec. Therefore Cygwin never calls ShellExecuteEx to fork/exec an application, rather it calls CreateProcess/CreateProcessAsUser, both of which don't provide a way to elevate a process. Therefore, to elevate a process from a Cygwin shell, the shell must already run elevated (e.g., right click on "Cygwin Terminal" -> "Run as Administrator..."). What's really annoying: RegEdit's mainfest does not request "asAdmin" rights. Rather it only requests "MaximumAllowed". One would think this means that a CreateProcess call would simply continue with the current permissions of the user. Not so, unfortunately. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --32u276st3Jlj2kUU Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJTcMOuAAoJEPU2Bp2uRE+gGnwQAKO8yEfyWrHL92Yw6e7I5OBA Ols/vmYnVfjSv8voQHA4YqwmKUMoK6+C7k3Y+zXjqYe+xy6s80u5PED5OKUm/SL5 VhhD59JO5hZ/nl9sKXmDB0tesI+C8lX83I4WVu6r2vnkqwIZENZOt3SCG2fWiOCW zCW0EnpeLoaBIOXGtamq4TIzfcRyyd6q/3oylGa5swLo1I2qoVZEhbHIQ6+pF/h/ ziLEgP5QHUb3j+0FLlDFJRB/MN4w+iso4S0bWb0eBF5Hir3H5O9Su0K26DniTlX4 MH/2ciDmYpGzUtlWP8CwKU25rp1/xJ5bpq8d5bp2mDkntsbLEozAFmhJKSdSmYfV /BtCCwUSg02NbEulaBVrHeWyMzGThSuz3ZyQ1Iygg/R4swA12WxJ++AGQIlD3LKm Jt0FUAYF67H6wN7klN5m7aYiFT3SrTPW3JY9iAbrxKK1T53fWp+XdPqPaIBZgcSG uuU9e+VMmycfvMn9221cLJbd3D8pRwsbXCH4RWJLvWOnHZWTbmPt2wS9VAwI63Mp N4kftWjdRvEK1u+EHRCMyyb+UVNBRkIIX2rlZbBYKVZoNZ2FQnUXzTug6RXcM4Gg enQFnnUk43cH0ozrGOcBSJmGHzkmCoLMiMB0zd9XQQIdavIIcCezDCvxARvDH7P1 9/FRSIgkmApkUYnaI2aq =Lj7o -----END PGP SIGNATURE----- --32u276st3Jlj2kUU--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |