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