none
Inject Registry Keys during deployment RRS feed

  • Question

  • Hello guys, A quick question for you: I have two different situation to assess here: 1) let's say I have a NEW registry key. I export it with the registry manager and I save it on my Server. How do I import it to my newly created machine? I wanted to add a step in the task sequence but... Which command should I use? 2) Let's say I need to update a registry key. I export the updated one and I save it on my server. How do I substitute the old one with the other? I was having a look at the syntax of the reg command line but I do not really get where I put the source file and how I put the destination file... Would you mind making some practical examples to help me to understand them? Thanks for the help!!
    Thursday, February 10, 2011 10:37 AM

Answers

  • Hi Daniele

    When I need to add a registry fix to a build I add a step in my task sequence. Put the registry in a specific location, say the scripts folder and I add this command to my task sequence step. regedit /s %SCRIPTROOT%\registryfix.reg

    Hope this helps

    Thanks

    Paul


    Twitter: paul__iddon..... Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. Dont forget to vote on if you find the answer helpful. This can be beneficial to other community members reading the thread.
    Thursday, February 10, 2011 12:47 PM

All replies

  • Hi Daniele

    When I need to add a registry fix to a build I add a step in my task sequence. Put the registry in a specific location, say the scripts folder and I add this command to my task sequence step. regedit /s %SCRIPTROOT%\registryfix.reg

    Hope this helps

    Thanks

    Paul


    Twitter: paul__iddon..... Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. Dont forget to vote on if you find the answer helpful. This can be beneficial to other community members reading the thread.
    Thursday, February 10, 2011 12:47 PM
  • Thanks for the help! I'll give that a go!
    Friday, February 11, 2011 10:05 AM
  • You can use the command "reg import %SCRIPTROOT%\yourfile.reg" too.

     

     

    Friday, February 11, 2011 2:27 PM
  • Hi Paul i tried your solution and it did not work what part of the task sequence that you are going to insert this command is it after state restore?

    Thanks,

    Cliff.

    Friday, April 29, 2011 4:41 PM
  • if you want during task sequence modify registry:

    1. hive for default user

    .bat file

    @echo off
    REG LOAD HKU\DU C:\Users\Default\NTUSER.DAT
    REG IMPORT %~dp0ProfileCustomizations.reg
    REG UNLOAD HKU\DU

    .reg file

    Windows Registry Editor Version 5.00
    
    ;Toggles 'Automatically expand current folder' on under Folder Options -> General tab
    [HKEY_USERS\DU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
    "NavPaneExpandToCurrentFolder"=dword:00000001
      
    ;Toggles 'Always show all icons and notifications in the taskbar' on under Notification Area Icons
    [HKEY_USERS\DU\Software\Microsoft\Windows\CurrentVersion\Explorer]
    "EnableAutoTray"=dword:00000000
      
    ;Enables the Computer and User's Files shortcuts on the desktop
    [HKEY_USERS\DU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel]
    "{59031a47-3f72-44a7-89c5-5595fe6b30ee}"=dword:00000000
    "{20D04FE0-3AEA-1069-A2D8-08002B30309D}"=dword:00000000
      
    ; Toggles Control Panel's default view to Small Icons
    [HKEY_USERS\DU\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel]
    "AllItemsIconView"=dword:00000001
    "StartupPage"=dword:00000001
      
    ;Toggles 'Hide empty drives in the Computer folder' off under Folder Options -> View tab
    [HKEY_USERS\DU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
    "HideDrivesWithNoMedia"=dword:00000000
      
    ;Toggles 'Hide extensions for known file types' off under Folder Options -> View tab
    [HKEY_USERS\DU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
    "HideFileExt"=dword:00000000
      
    ;Sets the computer's power plan to High Performance
    [HKEY_USERS\DU\Control Panel\PowerCfg]
    "CurrentPowerPolicy"="0"
      
    ;Toggles the Explorer Ribbon on at all times
    [HKEY_USERS\DU\Software\Microsoft\Windows\CurrentVersion\Explorer\Ribbon]
    "QatItems"=hex:3c,73,69,71,3a,63,75,73,74,6f,6d,55,49,20,78,6d,6c,6e,73,3a,73,\
       69,71,3d,22,68,74,74,70,3a,2f,2f,73,63,68,65,6d,61,73,2e,6d,69,63,72,6f,73,\
       6f,66,74,2e,63,6f,6d,2f,77,69,6e,64,6f,77,73,2f,32,30,30,39,2f,72,69,62,62,\
       6f,6e,2f,71,61,74,22,3e,3c,73,69,71,3a,72,69,62,62,6f,6e,20,6d,69,6e,69,6d,\
       69,7a,65,64,3d,22,66,61,6c,73,65,22,3e,3c,73,69,71,3a,71,61,74,20,70,6f,73,\
       69,74,69,6f,6e,3d,22,30,22,3e,3c,73,69,71,3a,73,68,61,72,65,64,43,6f,6e,74,\
       72,6f,6c,73,3e,3c,73,69,71,3a,63,6f,6e,74,72,6f,6c,20,69,64,51,3d,22,73,69,\
       71,3a,31,36,31,32,38,22,20,76,69,73,69,62,6c,65,3d,22,66,61,6c,73,65,22,20,\
       61,72,67,75,6d,65,6e,74,3d,22,30,22,20,2f,3e,3c,73,69,71,3a,63,6f,6e,74,72,\
       6f,6c,20,69,64,51,3d,22,73,69,71,3a,31,36,31,32,39,22,20,76,69,73,69,62,6c,\
       65,3d,22,66,61,6c,73,65,22,20,61,72,67,75,6d,65,6e,74,3d,22,30,22,20,2f,3e,\
       3c,73,69,71,3a,63,6f,6e,74,72,6f,6c,20,69,64,51,3d,22,73,69,71,3a,31,32,33,\
       35,32,22,20,76,69,73,69,62,6c,65,3d,22,66,61,6c,73,65,22,20,61,72,67,75,6d,\
       65,6e,74,3d,22,30,22,20,2f,3e,3c,73,69,71,3a,63,6f,6e,74,72,6f,6c,20,69,64,\
       51,3d,22,73,69,71,3a,31,32,33,38,34,22,20,76,69,73,69,62,6c,65,3d,22,74,72,\
       75,65,22,20,61,72,67,75,6d,65,6e,74,3d,22,30,22,20,2f,3e,3c,73,69,71,3a,63,\
       6f,6e,74,72,6f,6c,20,69,64,51,3d,22,73,69,71,3a,31,32,33,33,36,22,20,76,69,\
       73,69,62,6c,65,3d,22,74,72,75,65,22,20,61,72,67,75,6d,65,6e,74,3d,22,30,22,\
       20,2f,3e,3c,73,69,71,3a,63,6f,6e,74,72,6f,6c,20,69,64,51,3d,22,73,69,71,3a,\
       31,32,33,35,37,22,20,76,69,73,69,62,6c,65,3d,22,66,61,6c,73,65,22,20,61,72,\
       67,75,6d,65,6e,74,3d,22,30,22,20,2f,3e,3c,2f,73,69,71,3a,73,68,61,72,65,64,\
       43,6f,6e,74,72,6f,6c,73,3e,3c,2f,73,69,71,3a,71,61,74,3e,3c,2f,73,69,71,3a,\
       72,69,62,62,6f,6e,3e,3c,2f,73,69,71,3a,63,75,73,74,6f,6d,55,49,3e 

    2. hive for HKEY_LOCAL_MACHINE\SOFTWARE

    .bat file

    @echo off
    REG LOAD HKLM\TEMPSOFTWARE C:\windows\system32\config\software
    REG IMPORT %~dp0SystemCustomizations.reg
    REG UNLOAD HKLM\TEMPSOFTWARE

    .reg file

    Windows Registry Editor Version 5.00
    
    ; turn off Windows 8.1 Hi window
    [HKEY_LOCAL_MACHINE\TEMPSOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
    "EnableFirstLogonAnimation"=dword:00000000

    Friday, April 21, 2017 2:38 PM