Jump to content

Numlock


Recommended Posts

I've been using this method for a while. It works just fine for me.

In cmdlines.txt, I run "useraccounts.cmd." Right at the top of "useraccounts.cmd," I have the following:

REG ADD "HKCU\Control Panel\Keyboard" /v "InitialKeyboardIndicators" /d "2" /f

HKCU = Default user when run from cmdlines.txt. ;)

If you're trying to integrate a .reg file, I don't think that will work. I've tied regedit and regdit32 from cmdlines.txt. Neither seem to work. So just use the aforementioned code, because it works just fine. :)

edit:

In case I wasn't clear enough (I'm often too vague when I talk), regedit /s numlock.reg will NOT work.

Perhaps something like this would work for you (but I think the one in red that's above would be much better. Less code, and less files to keep track of...).

for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\WIN51 set CDROM=%%i:

%SystemRoot%\regedit.exe /s %cdrom%\somedirectory\numlock.reg

I'm not positive that will work, but I'm pretty sure.

Edited by Dumpy Dooby
Link to comment
Share on other sites


What if you try adding them in the registry hives of your ua cd? (dunno if that would change anything, but I can't seem to find an error in the current method)

Edited by djbe
Link to comment
Share on other sites

@Martin,

Where are your users pulling their Default Profiles from?

Do you have a ntuser.dat file in your %NETLOGON% directory?

If you do, then Windows will pull the default profile from the ntuser.dat file (this file is a registry hash). If you dont have a %NETLOGON%\ntuser.dat file then Windows will use the "Default User" account on the local system.

Link to comment
Share on other sites

Just for reference, the reg file Astalavista posted does work. The trick is getting it to load during cmdlines.txt - here's how I do it:

CMDLINES.TXT:

".\SETUP.CMD"

Yes, thats all I have in my cmdlines.txt, because I like my life simple. I put everything I want loaded during cmdlines.txt into that setup.cmd.

SETUP.CMD:

@echo off
echo -----=====##### XP AutoBuild Running  #####=====-----
echo.

echo      *** Default Registry Settings
for %%i in (C:\INSTALL\SETTINGS\*.reg) do regedit /s "%%i"

echo      *** Installing PowerToys
CALL "C:\INSTALL\POWERTOY\INSTALL.CMD"

... etc etc

Then, all I have to do to load a "Default User" registry setting (like numberlock) is to make a small reg file and toss it into the \install\settings directory. Simple.

Link to comment
Share on other sites

Hmmm, still no luck. Somehow I can see the changes are in registry (.Default), but new users are created without them :( This is really strange

Why on earth are you looking in .default? Unless you care about the login screen having it on. You are looking for HKCU or HKU\crap you shouldn't care about. Like someone said, look for where you're grabbing the default user, and just modify it's registry. The reg key posted should work.

Link to comment
Share on other sites

Hmmm, still no luck. Somehow I can see the changes are in registry (.Default), but new users are created without them :( This is really strange

Why on earth are you looking in .default? Unless you care about the login screen having it on. You are looking for HKCU or HKU\crap you shouldn't care about. Like someone said, look for where you're grabbing the default user, and just modify it's registry. The reg key posted should work.

When a new ueser is created, the registry settings from .DEFAULT are copied to CU. ;)

If you want some settings to affect everyone, .default is the best place to put it ... as long as no other accounts have been created. When cmdlines.txt is run, there are no accounts other than .default.

Link to comment
Share on other sites

Well, I am not using default profile. I used it before (it was already set this way before I came here), but now I want to get rid of it, because I dont know what is set and I dont have control over it.

BTW I got bored trying different approaches, so I just added everything to cmdlines.txt and it worked :) So I will now simply remove one line at every installation and see which one was working.

I will let you know where was the problem, thx for your ideas

Link to comment
Share on other sites

When a new ueser is created, the registry settings from .DEFAULT are copied to CU. ;)

If you want some settings to affect everyone, .default is the best place to put it ... as long as no other accounts have been created. When cmdlines.txt is run, there are no accounts other than .default.

I know what .default is, and it is not what you describe. You are confusing .default with the default user, like so many other people on this board. They are two very different things. There really needs to be a FAQ about this somewhere. I'm getting tired of seeing it everywhere.

.default - login session, located at HKU\.default

default user - located at %PATHTODOCSANDSETTINGS%\Default User (usually), needs to be loaded in order to edit.

Please people for the love of God, please understand this.

I talk about it more in this thread

2All: Solved, Nois3 was right - you CANT use reg directly in cmdlines, instead you must include it in batch and call that batch from cmdlines. Strange behaviour, however now it is working great!

I would have assumed you were trying to do it via a reg file or inf. You could always try the full path to reg.exe to see if that works, but if you got it working, I don't see a point.

Edited by sleepnmojo
Link to comment
Share on other sites

When a new ueser is created, the registry settings from .DEFAULT are copied to CU. ;)

If you want some settings to affect everyone, .default is the best place to put it ... as long as no other accounts have been created. When cmdlines.txt is run, there are no accounts other than .default.

I know what .default is, and it is not what you describe. You are confusing .default with the default user, like so many other people on this board. They are two very different things. There really needs to be a FAQ about this somewhere. I'm getting tired of seeing it everywhere.

.default - login session, located at HKU\.default

default user - located at %PATHTODOCSANDSETTINGS%\Default User (usually), needs to be loaded in order to edit.

Please people for the love of God, please understand this.

I talk about it more in this thread

With all due respect, you're wrong. They're the same thing. Go ahead and try putting an entry in HKU\.Default\ (preferably in Software\Microsoft\Windows\CV\Run\ because certain types of accounts don't import all of the registry keys). Afterwards, create a new account. Log into that account and you'll notice that the registry info that you put in HKU\.Default will now be in HKCU. If you don't see your string there, you've done something wrong. ;)

Now, do the same thing, except instead of putting an entry in the registry, try putting a file in \Documents and Settings\Default User\. Create an account. Log into that account. Now that file should be located in %userprofile%\. If you don't see the file, you've done something wrong.

If that's not enough proof for you, I will gladly provide you with a video in which I will execute all of the aforementioned commands. That is, under the condition that you will provide me a host for the said video.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...