Aplique o ajuste de registro aos usuários recém-criados

5

Suponha que eu tenha feito "Este PC" aparecer na minha área de trabalho com este ajuste de registro:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel]
"{20D04FE0-3AEA-1069-A2D8-08002B30309D}"=dword:00000000

E agora quero tornar isso um tipo de "padrão do sistema" que se aplica a todos os usuários criados após minha modificação, deixando os usuários existentes inalterados. Como posso conseguir isso?

Eu olhei para HKEY_USER\.DEFAULT , mas isso parece um pouco estranho e eu receio que não seja o lugar certo para aplicar meus ajustes.

    
por iBug 14.01.2018 / 10:42

1 resposta

7

Como posso aplicar um ajuste de registro a novos usuários?

Você precisa aplicar seu ajuste a HKEY_USERS em %SystemDrive%\Users\Default\NTUSER.DAT . Isso deve ser feito carregando a seção do registro.

Todas as configurações alteradas na seção carregada serão copiadas para cada novo perfil de usuário criado.

Instruções completas abaixo.

Nota:

To make sure every new profile created on a machine gets specific user settings we will need to change the registry settings that are used to build all new profiles. The trick is first to understand where these default settings come from. Then when we know where they come from we need to be able to edit them and save them. Once that is done all new profiles will be created with whatever settings we want.

The location of where new profiles copy their user registry settings is located on the file system at %SystemDrive%\Users\Default\NTUSER.DAT in Windows 7 and Windows Vista, in Windows XP it is located at %SystemDrive%\Documents and Settings\Default User\NTUSER.DAT. Now that we know what file is copied to create all new profile user registry settings we just need a way to edit the settings. Well there’s a tool for that, it’s called Regedit.exe.

The trick with editing the default user profile registry settings is to first know that it is not available in Regedit.exe by default. We will need to load the NTUSER.DAT file into Regedit.exe to be able to edit the settings. Open Regedit.exe by going to Start and typing Regedit, then right-click the search result and select Run as administrator. If you are currently logged on with a non-administrator the User Account Control box will allow you to provide administrative credentials, otherwise click Yes in the UAC box.

When Regedit starts, navigate to HKEY_USERS and left click it.

enter image description here

Go to the menu and select File->Load Hive. For more information on loading Windows Registry hives; http://technet.microsoft.com/en-us/library/cc732157.aspx.

enter image description here

Browse to the NTUSER.DAT file based on which Windows version you are using and Open it. You will have to have, ‘show hidden and system files’ enabled in the folder options control panel. For more information; http://windows.microsoft.com/en-US/windows7/Show-hidden-files.

enter image description here

Give the hive a name, it does not matter what name you give it. Here I used Default Profile, but it could have been anything.

enter image description here

In Regedit, browse to HKEY_USERS->whatever hive name you gave. You now be able to edit the default user profile registry settings. Remember to back them up first before editing

enter image description here

When finished, go to the menu File->Unload Hive.

enter image description here

That’s it! Any settings you change in the loaded hive will be copied to every new user profile that is created on that machine.

Fonte Dica 49: Como você define as configurações de registro de perfil de usuário padrão

Então, o que é HKU.DEFAULT se não for o usuário padrão?

Na verdade, é o perfil da conta do sistema local e é um alias para HKEY_USERS \ S-1-5-18:

Despite its name, the profile for the .Default user is not the default user profile. It's actually the profile for the Local System account and is an alias for HKEY_USERS\S-1-5-18. (S-1-5-18 is the security identifier for the Local System account.) Consequently, settings in HKEY_USERS.Default are used by programs and services that run as Local System. The most visible examples of programs that run as Local System are winlogon and logonui, the programs that display the interface for logging onto the system. Whatever color scheme and screen saver you choose for the Local System profile get used at the logon screen.

...

The registry settings for new users do not come from the .Default user. Rather, they come from what I've started calling the "template user", which is kept† in the file C:\Documents and Settings\Default User\ntuser.dat. This hive is not loaded most of the time (since there's no reason to waste memory on something that is needed only rarely), so if you want to make a change to the template user, you'll have to load the hive manually.

Mind you, messing with the template user hive directly is most likely not supported. The supported way of modifying the template user hive on Windows XP is to use the system preparation tool "SysPrep". Boot into factory mode, make your customizations to the current user, then reseal. The resealing process propagates the current user's settings to the template user (or, more specifically, the ones that can safely be propagated to the template user—you don't want to propagate things like encryption keys) before "resealing" the system for deployment.

Fonte O usuário .Default não é o usuário padrão

    
por 14.01.2018 / 11:00