Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Reg: Windows registry creation for all users in HKCU

1 view
Skip to first unread message

aJ

unread,
Dec 18, 2006, 7:41:01 AM12/18/06
to
Hello,
I have a requirement to create a registry entry in HKey Current User for all
the users ( new users to be created on that machine too) in that machine.
I tried to use HKEY_USERS\.DEFAULTS, but it is not working. Seems like this
will be copied to current user only if the user profile is getting created
for the first time.
Can any one help me in solving this problem.

Regards,
Anand

Rob Hamflett

unread,
Dec 18, 2006, 8:39:33 AM12/18/06
to
What's it for? I only ask in case it's initial data for an application. If so, the app should
handle it not being there.

Rob

aJ

unread,
Dec 18, 2006, 8:58:00 AM12/18/06
to
My application reads this information during startup. Earlier we used to use
HKLM for this purpose but now we are preparing msi which can be installed
without admin mode. So we cannot use HKLM.
Say, UI configuration, we need to write this info for each of the user in HK
current user.

Is it possible to do this by changing the HKEY Users?

Rob Hamflett

unread,
Dec 18, 2006, 10:21:39 AM12/18/06
to
That's really application configuration, which shouldn't be covered in deployment. What you really
need is an "on first run" section in your app to handle this.

Rob

Nick Heim

unread,
Dec 19, 2006, 4:43:58 AM12/19/06
to
Hi Anand,
you have to make a very clear picture of what you really need, first.
Yo wrote: "HKLM for this purpose but now we are preparing msi which can

be installed without admin mode. So we cannot use HKLM."
This was "can" not "must".
Therefore, you have to prepare the MSI for at least the following
scenarios:
- Installed by Users in only his profile
- Installed by Admin for all users.
good practice would be, to do the following too:
- Advertised via GPO. Users CAN install, but have evelated priviliges
for this task.
- Per user install via GPO.
- Adminstrative Install.

You can use HKCU settings only, but you have to make sure, that this
keys are delivered to each existing and new profile, if you have a
machine install.
This can be done with 'Active Setup' or 'Self Healing'. Search for this
terms on this forum, if need more info.
A 'normal' install by users should be plain forward, if you make sure,
that the installer writes nothing to locations, which users have no
access.
Hope, this gives you some ideas.
Regards, Nick

aJ schrieb:

mayayana

unread,
Dec 19, 2006, 9:07:11 AM12/19/06
to
Have you considered an INI file? As far as
I've been able to tell, the only non-restricted,
all-user location in Vista is the All Users\AppData
folder. Microsoft is essentially rendering the
standard locations (HKLM\Software\ and the
Program Files folder) defunct by setting
restrictions on their access. So it might be a
good idea to get into the habit of installing and
storing to App. Data.

Nick Heim

unread,
Dec 20, 2006, 10:22:14 AM12/20/06
to
Hi mayayana,
the All Users\AppData folder will be read only for profiles with user
privileges !
So, writing from an installation with user privileges to this location
is a no go!
Regards, Nick

mayayana

unread,
Dec 20, 2006, 7:40:08 PM12/20/06
to

> the All Users\AppData folder will be read only for profiles with user
> privileges !
> So, writing from an installation with user privileges to this location
> is a no go!

Are you sure about that. If true then there seems
to be no all-users location. But here:

http://msdn.microsoft.com/windowsvista/reference/default.aspx?pull=/library/
en-us/dnlong/html/AccProtVista.asp

it says that for a limited user account:

Write per-user data to the user profile (%APPDATA%).
Write per-machine data to users\all users\application data\...
(%ALLUSERSPROFILE%).

I had the impression that a "limited user account"
was as low as it goes on the totem pole, and that
therefore the app. data folders would always be
accessible. But I suppose that could also be
interpreted to imply that per-machine data is only
expected to be recorded by admin. It's hard to figure
out *exactly* how it all works from reading the MS docs.


0 new messages