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:message-id:date:from:mime-version:to:subject :content-type:content-transfer-encoding; q=dns; s=default; b=Q/R YYu8WehknGSz94C8rGK5gktOZVeEY0iKsJgg3jTWd3/ZTvJ4kTU5/r4rZQDH5LdB uQqdCbbl52GjSuLat+o//8izRFXZYwb4isAYHHn7C0terW8eFf7QaHtli+Una6By SbnVR/N5JNFZ0nF1gyPKkhsNXEslcB8ihA0PYQHs= 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:message-id:date:from:mime-version:to:subject :content-type:content-transfer-encoding; s=default; bh=czJJLrbg7 s7e4oQDQskp7B5v6bc=; b=m0jzw754DcC2fx4lLXknA2hNByJ8+T35RpM5PqL9B Uyd3G7KoaRTA9n5dvArJJi9WtwwcY4Ldc7+pjvoiuaFn3KTMtA4rl3tnYYqpQtAZ wLZ07vNAGU0ba4ajOtoau83ZOBgx+gZATfkCwQlqyWGGataMNPbkOtxKPALoJb4E 2k= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.9 required=5.0 tests=AWL,BAYES_20,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qe0-f43.google.com X-Received: by 10.229.71.5 with SMTP id f5mr80679092qcj.18.1388159104137; Fri, 27 Dec 2013 07:45:04 -0800 (PST) Message-ID: <52BDA080.3010601@gmail.com> Date: Fri, 27 Dec 2013 10:45:04 -0500 From: Max Polk User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Cygwin list Subject: sh.exe appcompatflags elevated privileges Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes On a fresh 32-bit cygwin install onto a 64-bit windows 7 machine, somehow sh.exe became a child node inside these two areas (or subtree areas) in the registry: HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags Causing it to require elevated permission to run. Each time I ran sh.exe manually, or via a script with /bin/sh shebang, even after several fresh installs, it popped up the user account control question asking for elevated privileges to run sh.exe. If you say yes, it opens in its own new console window. If you say no, you get permission denied. The data for the key in each case seemed to hint that it was marked as having to run it with elevated privileges, or in windows xp compatibility mode. By deleting both keys, normal functionality was restored. I'm sure I didn't ask for that. How it got this way is unknown, I had tried the 64-bit cygwin but couldn't do without clisp. Deleted, reinstalled 32-bit cygwin and it wouldn't work for the reasons above. Tried 2 more times, same thing. Since it lived beyond fresh installs, I finally tried searching the registry for "sh.exe". I removed the keys referencing sh.exe inside the areas listed above. Then things wouldn't run from emacs-w32 due to vfork problems and popen failure, so I had to ash rebaseall then all was well. Shot in the dark, but it might have to do with me trying BitDefender free antivirus which actually blocked an exe I freshly compiled, so since it was really blocking too many Cygwin things I went to AVG free. So I'm sending this mostly as a reference of how I fixed it in case someone else runs into it. Could be a narrow failure case under just the right set of conditions with Cygwin as the victim and some third-party software as the culprit. -- 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