Jump to content

About Importing HKLM entries using cmdlines.txt


Recommended Posts

I´ve read at MSFN Unattend Guide Aaron saying that is not recomendable to import HKEY_Local_Machina entries using the cmdlines.txt method, ´cause some entries might not be "sticky". So he says he recommends only to import HKCU entries with cmdlines.txt

But i´m using the Regtweaks colletion, to avoid using the Tweaks sections on nLite, and customize my own personal tweaks.

But appearently, some tweaks witch i´d like to use requires both keys, HKLM and HKCU!

Did anyone here ever had a problem at importing HKLM entries with cmdlines.txt?

´Cause i´m sincerilly thinking in, instead of making two files for my tweaks, hkcu.reg and hklm.reg (witch would be imported only at first logon), to use all entires into one reg file, tweaks.reg, and import all my tweaks using this file with cmdlines.txt

My only concern is that what if this does not work?

so, please, again, help!

Link to comment
Share on other sites


@gugutz

I think you're referring to the following quote

Possible, but is not really recommended for HKLM tweaks, because sometimes certain tweaks do not "stick" when imported on the earlier stages of the unattended setup.
in MSFN's Unattended Windows : Registry Tweaks article.

Well, I put this statement just because I've seen serveral threads where people experienced problems with some HKLM tweaks imported at T-12. However, I've never heard of problems with importing at the first logon.

So the article kind of reflects my personal opinion. You can certainly consider this little warning to be and old myth :) The way I look at it: if it's not a myph, it may be hard to pinpoint the source of the problem, unless you've seen it before.

Sometimes certain HKLM tweaks must be imported at T-12 in order to achieve some specific goals (i.e. to have some HKLM parameters already configured at the first logon).

To summarize: go ahead and put all your tweaks in one file, but remember about that little warning, if something goes wrong :)

HTH

Link to comment
Share on other sites

In my own tests, the HKLM tweaks applied at T-12 seem OK but some HKCU tweaks don't stick. I think it depends on what happens after T-12, what other programs are installed etc.

Anything that doesn't stick can always be re-applied on first logon.

Link to comment
Share on other sites

If a reg tweak doesn't stick (for whatever reason), it means no change has been made to that particular key. No big deal.

When you apply some reg tweak you don't understand, or apply the wrong tweak, that could be more harmful.

Link to comment
Share on other sites

Well! My 2 cents...

I divide my reg files into three groups CR, CU, and LM.

I apply a CR reg file (I have only one) from SVCPACK.

I apply some CU reg files from SVCPACK and some for each user individually after their logon.

I apply some LM reg files from SVCPACK and some after the first boot (only once).

To classify my reg files, it took me hours. *SIGH* But, it's finally DONE!

Look at these examples:

1- This tweak is for turning on the Keyboard Indicator whenever a computer boots.

If I apply it under a user account (after logon) it will not work.

If I apply it from SVCPACK (when no user is logged on, yet) it will work for any user, afterwards.

[HKEY_CURRENT_USER\Control Panel\Keyboard]
"InitialKeyboardIndicators"="2"

2- I use this tweak to get "Paint" open maximized on the first and every use.

It works wherever I apply it.

However, I like to run it from SVCPACK to get it applied to any user afterwards.

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Paint\View]
"WindowPlacement"=hex:2c,00,00,00,02,00,00,00,03,00,00,00,ff,ff,ff,ff,ff,ff,ff,\
ff,ff,ff,ff,ff,ff,ff,ff,ff,00,00,00,00,00,00,00,00,13,01,00,00,9a,01,00,00

3- Without this tweak, I can't set Explorer (unattendedly) to work with a single-click behavior.

It works wherever I apply it.

However, if I apply it from SVCPACK, it messes my theme (Royale) up.

So, I apply it from CU-RO, and for each user individually; after his/her logon for the first time.

I'm keeping some REG/INF files behind on HDD for this purpose.

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]
"ShellState"= ....YOUR SETTINGS HERE....

4- This tweak disables "System Restore".

If you don't disable "System Restore" at an earlier point, you may get

"System Volume Information" hidden folder created. I got it on Drive C.

I hope I'm relating things correctly, here!

So, I apply this tweak from SVCPACK and get it working without that hidden folder being created.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore]
"DisableSR"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\sr]
"Start"=dword:00000004

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\sr\Parameters]
"FirstRun"=dword:00000001

Link to comment
Share on other sites

there it goes again, mazin. you are the man, dude!

thanks for the hint of "not creating the 'Sys Vol Info' folder. i´m gonna apply that with cmdlines.txt, and if not work, i´m gonna test from svcpack.

so i´m gonna apply my reg twkeas all-in-one, and see what will not work.

it will take me some time, in a way or another.

thanks for all. :thumbup

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...