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: Baffled: is it Cygwin (64-bits) or Windows that causes the invocation of regedit (from bash) to fail?

Hi Corinna,

Thank you for sharing your expert knowledge!

>> Consequently, I decided to investigate why I got the denial (64-bits Cygwin) at my end.
>> First of all, some more info about my "environment":
>>  - I am using Cygwin from Windows 7 ...
>>  - I am using Cygwin from an administrative account ...
>>  - furthermore, using secpol.msc, I have set the ConsentPromptBehaviorAdmin field in
>>    HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System (key in registry)
>>    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.

Interesting! I can assure you that I am UNfamiliar grounds here :-)

But how do you explain, that I can invoke regedit from 32-bits Cygwin, using
an UNelevated bash?
(both /drv/c/Windows/regedit and /drv/c/Windows/SysWOW64/regedit)

(Sorry, I will look into that myself :-)


@ stat_uac
The values of the fields are currently:

 1. ConsentPromptBehaviorAdmin     0x0
 2. ConsentPromptBehaviorUser      0x1
 3. EnableInstallerDetection       0x1
 4. EnableLUA                      0x1
 5. EnableSecureUIAPaths           0x1
 6. EnableUIADesktopToggle         0x0
 7. EnableVirtualization           0x0
 8. PromptOnSecureDesktop          0x1
 9. ValidateAdminCodeSignatures    0x0
10. FilterAdministratorToken       0x0


Problem reports:
Unsubscribe info:

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