Jump to content

file to be run once for each user


 Share

Recommended Posts

Hi, I have a little .reg here that is used to set the good keyboard layout since even winnt.sif can't do it. It works fine, but for 1 user. The Administrator user have the good keyboard since he's the one running the installation, but once I add other user, it don't have the correct keyboard.

Here is my script:

Windows Registry Editor Version 5.00


;============ Deleting any keyboard configuration already installed ===========
[-HKEY_USERS\.DEFAULT\Keyboard Layout]

[-HKEY_USERS\.DEFAULT\Keyboard Layout\Preload]

[-HKEY_USERS\.DEFAULT\Keyboard Layout\Substitutes]

[-HKEY_USERS\.DEFAULT\Keyboard Layout\Toggle]

[-HKEY_CURRENT_USER\Keyboard Layout]

[-HKEY_CURRENT_USER\Keyboard Layout\Preload]

[-HKEY_CURRENT_USER\Keyboard Layout\Substitutes]

[-HKEY_CURRENT_USER\Keyboard Layout\Toggle]



;============ setting default user Canadian French Keyboard ===================
[HKEY_USERS\.DEFAULT\Keyboard Layout]

[HKEY_USERS\.DEFAULT\Keyboard Layout\Preload]
"1"="00010c0c"

[HKEY_USERS\.DEFAULT\Keyboard Layout\Substitutes]
"00010c0c"="00001009"

[HKEY_USERS\.DEFAULT\Keyboard Layout\Toggle]
"Hotkey"="3"
"Language Hotkey"="3"
"Layout Hotkey"="3"

;============= setting current user Candian French Keyboard ================
[HKEY_CURRENT_USER\Keyboard Layout]

[HKEY_CURRENT_USER\Keyboard Layout\Preload]
"1"="00010c0c"

[HKEY_CURRENT_USER\Keyboard Layout\Substitutes]
"00010c0c"="00001009"

[HKEY_CURRENT_USER\Keyboard Layout\Toggle]
"Hotkey"="3"
"Language Hotkey"="3"
"Layout Hotkey"="3"

As you can see, I change the .default user but it doesn't work, all other user are still with the default setup keyboard (which can't be set to canadian french, it's always canadian french legacy).

So what I'm looking for its a way to get the kb.reg file running at first logon for every user that are created even if they are created 2 weeks after the installation. Somebody know how to do that?

Thanks

Link to comment
Share on other sites


add there ur reg file

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce

Create String value and named its like run01

and enter value regedit /s C:\windows\kb.reg

Link to comment
Share on other sites

@ nodiaque

Although its effect will be negligible, may I also suggest you shorten your file slightly too!

Windows Registry Editor Version 5.00

;============ Deleting any keyboard configuration already installed ===========
[-HKEY_USERS\.DEFAULT\Keyboard Layout]

[-HKEY_CURRENT_USER\Keyboard Layout]

;============ setting default user Canadian French Keyboard ===================
[HKEY_USERS\.DEFAULT\Keyboard Layout\Preload]
"1"="00010c0c"

[HKEY_USERS\.DEFAULT\Keyboard Layout\Substitutes]
"00010c0c"="00001009"

[HKEY_USERS\.DEFAULT\Keyboard Layout\Toggle]
"Hotkey"="3"
"Language Hotkey"="3"
"Layout Hotkey"="3"

;============= setting current user Candian French Keyboard ================
[HKEY_CURRENT_USER\Keyboard Layout\Preload]
"1"="00010c0c"

[HKEY_CURRENT_USER\Keyboard Layout\Substitutes]
"00010c0c"="00001009"

[HKEY_CURRENT_USER\Keyboard Layout\Toggle]
"Hotkey"="3"
"Language Hotkey"="3"
"Layout Hotkey"="3"

Link to comment
Share on other sites

Hi, I have a little .reg here that is used to set the good keyboard layout since even winnt.sif can't do it. It works fine, but for 1 user. The Administrator user have the good keyboard since he's the one running the installation, but once I add other user, it don't have the correct keyboard.

If I am understanding you correctly, then problem is that HKEY_USERS\.DEFAULT does not do what you think it does.

HKEY_USERS\.DEFAULT does not contain the registry settings for the default user profile, it contains (as I understand it) the registry settings for the profile the system uses when no one is currently logged into the system.

If you wish to apply settings to user profile that newly created users inherit, you want to apply them to the default user registry hive, which is stored in "<profiles dir>\default user\ntuser.dat", commonly located in "C:\Documents and Settings\Default User\NTUSER.DAT". To do this, you might use a batch file like so:

@echo off
REG.EXE /LOAD HKU\DefaultHive "C:\Documents and Settings\Default User\NTUSER.DAT"
REGEDIT.EXE /s kb.reg
REG.EXE /UNLOAD HKU\DefaultHive

This will load the default user's registry hive to HKEY_USERS\DefaultHive, allowing you to directly modify the settings and then unload the hive when you are done. Of course, you will have to modify your registry file to accomodate the new registry key's name.

-----

Domain

Link to comment
Share on other sites

I apply my reg file (for kb layout) at T-13 to be inherited by every user.

hmmm... how is that done? I think it's from svcpack.inf but to be honest, I haven't played with unattended since 2 years ago, alot change since then and I can't find anything about it in unattended.msfn.org

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...