X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Wed, 10 Oct 2012 09:31:45 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Registry keys not only accessible when user Message-ID: <20121010073145.GA31314@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <1349807869703-93406 DOT post AT n5 DOT nabble DOT com> <507484C0 DOT 3070406 AT cygwin DOT com> <1349815868856-93419 DOT post AT n5 DOT nabble DOT com> <50749DDE DOT 6030905 AT cygwin DOT com> <1349850743935-93436 DOT post AT n5 DOT nabble DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1349850743935-93436.post@n5.nabble.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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 Oct 9 23:32, julien2412 wrote: > Larry Hall (Cygwin) wrote > > On 10/9/2012 4:51 PM, julien2412 wrote: > >> Anyway, I noticed that with regtool, everything was ok. > >> Is "regtool" the recommanded way to access (in read only) registry keys? > >> And > >> so we should avoid to run things like this Perl script line: > >> open($fhandle, "/proc/registry/$key") ) > > > > Whichever works. ;-) > > With admin rights, whichever works. > With no admin rights, regtool is the only to access any registry keys. > > 1) Why with no admin rights, ls /proc/registry doesn't map all the keys? > After all, the goal is just to read only > 2) Is there a way to have access to any registry keys without admin rights > and without using regtool? If you could show us examples, we might even be able to look into this problem, *if* it is a problem. I just tried the following on Windows 7 as an UAC-restricted admin: $ ls -l /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/ | wc -l 149 $ regtool list /HKLM/SOFTWARE/Microsoft | wc -l 149 $ reg query HKLM\\SOFTWARE\\Microsoft | wc -l 149 <--- This is wrong! It only shows 148 entries, the first line of output is empty. And this is under a fully enabled admin shell: $ ls -l /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/ | wc -l 148 $ regtool list /HKLM/SOFTWARE/Microsoft | wc -l 148 $ reg query HKLM\\SOFTWARE\\Microsoft | wc -l 149 <--- Actually 148, as above. The difference is an entry called "AudioCompressionManager", which is only visible when running UAC-restricted. Note that this entry is not visible when using the Windows reg tool at all, and it's also invisible in regedit. Now, if you could give us some details from your side, we might be able to see a pattern. 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