MSFN Forum: file to be run once for each user - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

file to be run once for each user Rate Topic: -----

#1 User is offline   nodiaque 

  • Code Master
  • Pip
  • Group: Members
  • Posts: 98
  • Joined: 21-July 04

Posted 17 December 2006 - 09:46 AM

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


#2 User is offline   neo 

  • Microsoft MVP - Windows Expert Consumer
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,251
  • Joined: 31-March 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 17 December 2006 - 11:24 AM

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

#3 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,195
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 17 December 2006 - 12:49 PM

@ 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"
 


#4 User is offline   mazin 

  • MSFN Addict
  • Group: Supreme Sponsor
  • Posts: 1,952
  • Joined: 12-January 04

Posted 20 December 2006 - 03:34 PM

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

#5 User is offline   Domain 

  • Group: Members
  • Posts: 5
  • Joined: 14-June 05

Posted 20 December 2006 - 04:46 PM

View Postnodiaque, on Dec 17 2006, 10:46 AM, said:

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

#6 User is offline   nodiaque 

  • Code Master
  • Pip
  • Group: Members
  • Posts: 98
  • Joined: 21-July 04

Posted 20 December 2006 - 09:10 PM

View Postmazin, on Dec 20 2006, 05:34 PM, said:

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

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy