delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/06/25/11:45:12

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Fri, 25 Jun 2010 17:44:55 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: 1.7.5: cygwin blocks UAC dialog
Message-ID: <20100625154455.GS8163@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4C24B63E DOT 2040901 AT ptc DOT com>
MIME-Version: 1.0
In-Reply-To: <4C24B63E.2040901@ptc.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Jun 25 19:29, Shailo Sanyal wrote:
> Hi,
> 
> I am running Cygwin 1.7.5 on Windows 7 (64-bit):
> ------------------------------------
> I4846-vm:intgpune [2] uname -a
> CYGWIN_NT-6.1-WOW64 I4846-vm 1.7.5(0.225/5/3) 2010-04-12 19:07 i686 Cygwin
> ------------------------------------
> 
> If I run an exe from a cygwin tcsh shell the UAC dialog is being
> blocked. I get a "Permission denied." error.
> 
> Here is the manifest file for the exe:
> ------------------------------------
> <?xml version='1.0' encoding='UTF-8' standalone='yes'?>
> <assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
>  <security>
>   <requestedPrivileges>
>    <requestedExecutionLevel level="requireAdministrator"/>
>   </requestedPrivileges>
>  </security>
> </trustInfo>
> </assembly>
> ------------------------------------
> 
> This is breaking some of my scripts which call an executable and
> need the UAC dialog to be popped up.
> 
> In a related issue - I also find that Cygwin simply blocks all error
> message popups e.g. for missing DLLs from executables. This makes it
> hard to debug runtime issues.
> 
> Is this a bug with Cygwin? Can it be fixed?

It's not a bug and it can't be fixed.  You can't do this from the
command line.  Child processes are forked and exec'd using the Win32
CreateProcess or CreateProcessAsUser calls.  None of the CreateProcess*
calls has any provisions to interact with UAC.

For the same reason you have to start the entire console session
elevated to run the shell and subsequent applications elevated.

What you could try to do is to start the application via a shim which
calls ShellExecuteEx with the "runas" verb as described here:
http://msdn2.microsoft.com/en-us/library/bb756922.aspx


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019