Thread View: borland.public.cppbuilder.nativeapi
10 messages
10 total messages
Started by D Ray
Mon, 26 Nov 2007 04:31
Registry
Author: D Ray
Date: Mon, 26 Nov 2007 04:31
Date: Mon, 26 Nov 2007 04:31
11 lines
1206 bytes
1206 bytes
This may not be the best group, but it seems like it to me. I need a place in the registry to create a value that is read/writeable by all users (whether admin or ordinary and regardless of which user created it) on a system and will work with any version of Windows from Windows2000 forward. Does such a location exist? TIA David
Re: Registry
Author: Mark Jacobs
Date: Mon, 26 Nov 2007 09:24
Date: Mon, 26 Nov 2007 09:24
18 lines
1800 bytes
1800 bytes
"D Ray" <david@timecalc.com> wrote in message news:474a4ca5$1@newsgroups.borland.com... > I need a place in the registry to create a value that is read/writeable by > all users (whether admin or ordinary and regardless of which user created > it) on a system and will work with any version of Windows from Windows2000 > forward. > Does such a location exist? The usual place is hkey_local_machine\software\Your Company\Your Software Title Whatever the case, you will always need Registry write access if you want to store data there. Under Vista, this usually needs the manual dismissal of at least one UAC prompt. -- Mark Jacobs DK Computing http://www.dkcomputing.co.uk
Re: Registry
Author: Colin B Maharaj
Date: Thu, 29 Nov 2007 23:51
Date: Thu, 29 Nov 2007 23:51
33 lines
2361 bytes
2361 bytes
Nope nope nope nope, HKLM is for Administrator users only. Sorry for sounding a little harsh Mark, but I am right on this. I think I will have to write an article on this or something. For all user settings, use HKEY_USERS (your hKey) then..... ".DEFAULT\\Software\\Your Company\\Your Software Title\\" (your SubKey) as the starting point for your settings..... It will work in Win2k (all), WinXp Pro, Win2003 Server(s), Win Vista (all). I have software that works on all these platforms without any tricky coding and all work perfectly - same code base same EXE. Mark Jacobs wrote: > "D Ray" <david@timecalc.com> wrote in message > news:474a4ca5$1@newsgroups.borland.com... >> I need a place in the registry to create a value that is >> read/writeable by all users (whether admin or ordinary and regardless >> of which user created it) on a system and will work with any version >> of Windows from Windows2000 forward. >> Does such a location exist? > > The usual place is hkey_local_machine\software\Your Company\Your > Software Title > > Whatever the case, you will always need Registry write access if you > want to store data there. Under Vista, this usually needs the manual > dismissal of at least one UAC prompt.
Re: Registry
Author: Alan Bellingham
Date: Fri, 30 Nov 2007 09:51
Date: Fri, 30 Nov 2007 09:51
15 lines
1504 bytes
1504 bytes
Colin B Maharaj <noreply@myhost.com> wrote: >Nope nope nope nope, HKLM is for Administrator users only. >Sorry for sounding a little harsh Mark, but I am right >on this. Unfortunately, your idea of using the per-user setting will provide a different place for each user. I suspect that that is not exactly what the OP wanted. Alan Bellingham -- Team Browns <url:http://www.borland.com/newsgroups/> Borland newsgroup descriptions <url:http://www.borland.com/newsgroups/netiquette.html> netiquette
Re: Registry
Author: Colin B Maharaj
Date: Sat, 01 Dec 2007 00:07
Date: Sat, 01 Dec 2007 00:07
18 lines
1805 bytes
1805 bytes
Alan Bellingham wrote: > Colin B Maharaj <noreply@myhost.com> wrote: > >> Nope nope nope nope, HKLM is for Administrator users only. >> Sorry for sounding a little harsh Mark, but I am right >> on this. > > Unfortunately, your idea of using the per-user setting will provide a > different place for each user. I suspect that that is not exactly what > the OP wanted. > > Alan Bellingham And this is why you use [HKEY_USERS\.DEFAULT] and not HKEY_CURRENT_USER. HKLM is for special information like installation logs, hardware auto run on login.. etc....Not for all user settings, that needs to be available to all users.
Re: Registry
Author: Alan Bellingham
Date: Sat, 01 Dec 2007 00:39
Date: Sat, 01 Dec 2007 00:39
18 lines
1567 bytes
1567 bytes
Colin B Maharaj <noreply@myhost.com> wrote: >And this is why you use [HKEY_USERS\.DEFAULT] and not HKEY_CURRENT_USER. > >HKLM is for special information like installation logs, hardware >auto run on login.. etc....Not for all user settings, that needs >to be available to all users. Ah, sorry. I misread your response - the moment the HKEY...USER turned up, I read it as HKCU. Blame the autopilot. Alan Bellingham -- Team Browns <url:http://www.borland.com/newsgroups/> Borland newsgroup descriptions <url:http://www.borland.com/newsgroups/netiquette.html> netiquette
Re: Registry
Author: Alan Bellingham
Date: Sat, 01 Dec 2007 02:09
Date: Sat, 01 Dec 2007 02:09
37 lines
2529 bytes
2529 bytes
Colin B Maharaj <noreply@myhost.com> wrote: >For all user settings, use HKEY_USERS (your hKey) >then..... >".DEFAULT\\Software\\Your Company\\Your Software Title\\" (your SubKey) >as the starting point for your settings..... > >It will work in Win2k (all), WinXp Pro, Win2003 Server(s), Win Vista (all). > >I have software that works on all these platforms without any >tricky coding and all work perfectly - same code base same EXE. Unfortunately, attempting to create a new key under HKEY_USERS\.DEFAULT\Software just fails with an error for me. (That the HKEY_USERS\.DEFAULT appears to be the place where the Local System account stores stuff (and nothing to do with default users at all) probably doesn't help.) The *only* keys on this machine that I have write access to are HKEY_USERS\S-1-5-21-796845957-117609710-839522115-1003 and HKEY_USERS\S-1-5-21-796845957-117609710-839522115-1003_Classes, which I am under the impression is specific to this user SID. So I think I don't understand your solution. Remember, the objective is to provide a place where all users can both read and write values. My personal inclination would be to create a key during installation as HKEY_LOCAL_MACHINE\Software\MyCompany\MySoftware\SharedSettings, and set that key to be accessible to all. That'd require elevated permissions during install, but I need that anyway. Alan Bellingham -- Team Browns <url:http://www.borland.com/newsgroups/> Borland newsgroup descriptions <url:http://www.borland.com/newsgroups/netiquette.html> netiquette
Re: Registry
Author: Colin B Maharaj
Date: Sat, 01 Dec 2007 07:02
Date: Sat, 01 Dec 2007 07:02
16 lines
1759 bytes
1759 bytes
Alan Bellingham wrote: > Colin B Maharaj <noreply@myhost.com> wrote: > > Unfortunately, attempting to create a new key under > HKEY_USERS\.DEFAULT\Software just fails with an error for me. > > (That the HKEY_USERS\.DEFAULT appears to be the place where the Local > System account stores stuff (and nothing to do with default users at > all) probably doesn't help.) Alan I am embarrassed, you are right.....(after swearing by my methods). This means most of my customers are running as Admin accounts... (bummer)... I will keep looking for a solution..... :(
Re: Registry
Author: Colin B Maharaj
Date: Sat, 01 Dec 2007 07:11
Date: Sat, 01 Dec 2007 07:11
56 lines
3266 bytes
3266 bytes
On another note Alan, I remember that what I do is not store centralized setting in the registry, but in a common location in the hard disk. First I call SHGetSpecialFolderLocation with nFolder = CSIDL_COMMON_APPDATA; This gives the Documents and Settings folder then I go [docs and settings]\\company\\product\\product.ini and write to this ini file. This is how I centralize my settings....and it works with non-admin accounts. >> >> It will work in Win2k (all), WinXp Pro, Win2003 Server(s), Win Vista (all). >> Sorry about the mis-information..... Alan Bellingham wrote: > Colin B Maharaj <noreply@myhost.com> wrote: > >> For all user settings, use HKEY_USERS (your hKey) >> then..... >> ".DEFAULT\\Software\\Your Company\\Your Software Title\\" (your SubKey) >> as the starting point for your settings..... >> >> It will work in Win2k (all), WinXp Pro, Win2003 Server(s), Win Vista (all). >> >> I have software that works on all these platforms without any >> tricky coding and all work perfectly - same code base same EXE. > > Unfortunately, attempting to create a new key under > HKEY_USERS\.DEFAULT\Software just fails with an error for me. > > (That the HKEY_USERS\.DEFAULT appears to be the place where the Local > System account stores stuff (and nothing to do with default users at > all) probably doesn't help.) > > The *only* keys on this machine that I have write access to are > HKEY_USERS\S-1-5-21-796845957-117609710-839522115-1003 and > HKEY_USERS\S-1-5-21-796845957-117609710-839522115-1003_Classes, which I > am under the impression is specific to this user SID. > > So I think I don't understand your solution. Remember, the objective is > to provide a place where all users can both read and write values. > > My personal inclination would be to create a key during installation as > HKEY_LOCAL_MACHINE\Software\MyCompany\MySoftware\SharedSettings, and set > that key to be accessible to all. That'd require elevated permissions > during install, but I need that anyway. > > Alan Bellingham
Re: Registry
Author: Alan Bellingham
Date: Sat, 01 Dec 2007 14:34
Date: Sat, 01 Dec 2007 14:34
18 lines
1692 bytes
1692 bytes
Colin B Maharaj <noreply@myhost.com> wrote: >Alan I am embarrassed, you are right.....(after swearing by my methods). > >This means most of my customers are running as Admin accounts... >(bummer)... I will keep looking for a solution..... > >:( Damn. I was really hoping you did have a solution. (It does seem an interesting shortcoming in the registry that there doesn't seem to be a central place as asked for by the OP.) Alan Bellingham -- Team Browns <url:http://www.borland.com/newsgroups/> Borland newsgroup descriptions <url:http://www.borland.com/newsgroups/netiquette.html> netiquette
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads