In the Windows 2000 Resource Kit there is a utility reg.exe that can be
used in batch files to script registry modifications.

For example, here are a couple of lines using reg.exe (in the z:\bin
directory) that modify variables in the HKEY_LOCAL_MACHINE Hive. I use
these on a Windows XP installation for a laptop that does not belong to
a domain:
 
rem Disable Windows Welcome Screen (classic logon)
%z%\bin\reg add "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon" /v "AllowMultipleTSSessions" /t REG_DWORD /f
/d 0x0
%z%\bin\reg add "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon" /v "LogonType" /t REG_DWORD /f /d 0x0

Perhaps you could use a logon script to check for group membership
(KiXtart is an easy way of doing this) and call an appropriate batch
file to set registry values in HKEY_CURRENT_USER, although I am not sure
if the logon script would attempt to run before the user profile had
been created. If you stick a shortcut to a kiXtart script in
C:\Documents and Settings\All Users\Start Menu\Programs\Startup this
should run at the correct point.

James Barlow
TRL Technology Ltd.

http://www.kixtart.org/
KiXtart Home Page

-----Original Message-----
From: Patrick J. LoPresti [mailto:[EMAIL PROTECTED] 
Sent: 25 March 2004 19:40
To: Julien TOUCHE
Cc: Unattended List
Subject: Re: [Unattended] registry + other user


Julien TOUCHE <[EMAIL PROTECTED]> writes:

> has someone some experience with script to edit registry of other 
> users ?
> 
> i explain:
> for now, i have *.reg o to modify HKLM et HKCU for Admin.
> but if i want to add some users (with Addusers for example) and change

> their registry settings only on each of them or their group, how ? 
> HKEY_USERS\.DEFAULT is no good as i don't want same settings for all.
> example:
> have some settings for group admin, group users, group guest.

With local profiles, you cannot do this until after the user has logged
in for the first time.  This is because the user-specific registry
settings are stored in the profile, and a local profile is created (by
copying the Default User profile) the first time a user logs in.

If the user has logged in already, or if you are using roaming profiles,
you can edit the NTUSER.DAT registry hive in the profile folder.  For
local profiles, this is normally "C:\Documents and Settings\username".
For roaming profiles, it is whatever network directory you use to hold
the profiles.

To edit these settings, you must first load the hive.  Interactively,
you would run regedt32, select Registry -> Load Hive, navigate to the
NTUSER.DAT file you want, and choose where in the registry the hive
should appear.  (Note that NTUSER.DAT is a "hidden" file.)  Then you
would edit the registry and unload the hive.

MS documents this here:

 
http://www.microsoft.com/windows2000/en/server/help/load_hive_reged.htm

From a Perl script, you would use Win32::TieRegistry, call the "Load"
method to load the hive, make your registry changes, and call the Unload
method.  We use this approach to edit the "Default User" hive in our
win2ksp4-notips.pl script.  Search for NTUSER.DAT in:

 
http://cvs.sourceforge.net/viewcvs.py/unattended/unattended/install/bin/
win2ksp4-notips.pl?view=markup

 - Pat

This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender
immediately by telephoning +44(1684) 278700. You should not copy it
or use it for any purpose nor disclose or distribute its contents to
any other person.


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
unattended-info mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unattended-info

Reply via email to