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 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 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline 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 Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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: > ------------------------------------ > > > > > > > > > > > ------------------------------------ > > 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