Running .reg file with full control at system startup

Discussion in 'Software' started by BB88, Jun 20, 2012.

  1. BB88

    BB88 Kilobyte Poster Gold Member

    383
    13
    76
    I have a .reg file that I have written for work that needs to modify certain registry keys, which require full control.

    I can manually log in and add permissions to the correct keys, but this is not practical, and I need to scale it across the network.

    The ones that require full control are the ones with Attributes in them.

    Any ideas chaps?

    Ta
    Code:
    Windows Registry Editor Version 5.00
    
    ;Disables Lock Workstation
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]
    "DisableLockWorkstation"=dword:00000001
    
    ;Remove Favourites from the Navigation Pane (32-bit)
    [HKEY\CLASSES_ROOT\CLSID\{323CA680-C24D-4099-B94D-446DD2D7249E}\ShellFolder]
    "Attributes"=dword:a9400100
    
    ;Remove Favourites from the Navigation Pane (64-bit)
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{323CA680-C24D-4099-B94D-446DD2D7249E}\ShellFolder]
    "Attributes"=dword:a9400100
    
    ;Turn Off the Navigation Pane in Windows Explorer
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Modules\GlobalSettings\Sizer]
    "PageSpaceControlSizer"=hex:c8,00,00,00,00,00,00,00,00,00,00,00,d7,03,00,00
    
    ;Remove Network from the Navigation Pane (32-bit)
    [HKEY_CLASSES_ROOT\CLSID\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}\ShellFolder]
    "Attributes"=dword:b0940064
    
    ;Remove Network from the Navigation Pane (64-bit)
    [HKEY_Local_Machine\Software\Wow6432Node\Classes\CLSID\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}\ShellFolder]
    "Attributes"=dword:b0940064
    
    ;Remove All Libraries from the Navigation Pane [32-bit]
    [HKEY_CLASSES_ROOT\CLSID\{031E4825-7B94-4dc3-B131-E946B44C8DD5}\ShellFolder]
    "Attributes"=dword:b090010d
    
    ;Remove All Libraries from the Navigation Pane (64-bit)
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{031E4825-7B94-4dc3-B131-E946B44C8DD5}\ShellFolder]
    "Attributes"=dword:b090010d
    
    ;Disable Auto Complete/Auto Suggest
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoComplete]
    "AutoSuggest"="no"
    "Append Completion"="no"
     
    Last edited: Jun 20, 2012
    Certifications: CompTIA A+, CompTIA Network+, MCSA: Office 365,, 70-410, 70-680
    WIP: CompTIA: Security+
  2. kevicho

    kevicho Gigabyte Poster

    1,219
    58
    116
    You can use group policy preferences to do this or create a batch file using the "reg" command to modify items.

    *edit been a whilse since we used reg (as GPO is better) you may have to delete and create as there may not be a modify command - you can also use reg import to import a precreated reg file*

    We use group policy.
     
    Last edited: Jun 20, 2012
    Certifications: A+, Net+, MCSA Server 2003, 2008, Windows XP & 7 , ITIL V3 Foundation
    WIP: CCNA Renewal
  3. BB88

    BB88 Kilobyte Poster Gold Member

    383
    13
    76
    Can you elaborate more? I have tried setting them in Computer Configuration // Registry but they do not work..
     
    Certifications: CompTIA A+, CompTIA Network+, MCSA: Office 365,, 70-410, 70-680
    WIP: CompTIA: Security+
  4. kevicho

    kevicho Gigabyte Poster

    1,219
    58
    116
    try in "Computer config - preferences - Windows Settings - Registry"
     
    Certifications: A+, Net+, MCSA Server 2003, 2008, Windows XP & 7 , ITIL V3 Foundation
    WIP: CCNA Renewal
  5. BB88

    BB88 Kilobyte Poster Gold Member

    383
    13
    76
    Setting the registry in group policy has no effect. I have set them in the default policy and it still doesn't even modify/create any
     
    Certifications: CompTIA A+, CompTIA Network+, MCSA: Office 365,, 70-410, 70-680
    WIP: CompTIA: Security+
  6. SimonD
    Honorary Member

    SimonD Terabyte Poster

    3,681
    440
    199
    I would have a look at MyPCHealth to see if putting those settings into an ADM file would work better for you.
     
    Certifications: CNA | CNE | CCNA | MCP | MCP+I | MCSE NT4 | MCSA 2003 | Security+ | MCSA:S 2003 | MCSE:S 2003 | MCTS:SCCM 2007 | MCTS:Win 7 | MCITP:EDA7 | MCITP:SA | MCITP:EA | MCTS:Hyper-V | VCP 4 | ITIL v3 Foundation | VCP 5 DCV | VCP 5 Cloud | VCP6 NV | VCP6 DCV | VCAP 5.5 DCA
  7. kevicho

    kevicho Gigabyte Poster

    1,219
    58
    116
    Is the policy definately being applied? check by typing "gpresult /r /scope computer" (ignore the /r if you are on XP)

    Is this on Windows 7 or XP, if its on XP you need a update to get GP preferences working.
     
    Certifications: A+, Net+, MCSA Server 2003, 2008, Windows XP & 7 , ITIL V3 Foundation
    WIP: CCNA Renewal
  8. BB88

    BB88 Kilobyte Poster Gold Member

    383
    13
    76
    @SimonD
    Cheers that link looks good.

    @kevicho
    Windows 7 with Server 2008 R2, will check that command and let you know.
     
    Certifications: CompTIA A+, CompTIA Network+, MCSA: Office 365,, 70-410, 70-680
    WIP: CompTIA: Security+
  9. BB88

    BB88 Kilobyte Poster Gold Member

    383
    13
    76
    I have started making an .ADM Template as suggest by SimonD
    Code:
    CLASS MACHINE
    
    CATEGORY "Windows 7"
    
    	KEYNAME "SOFTWARE\Wow6432Node\Classes\CLSID\{323CA680-C24D-4099-B94D-446DD2D7249E}\ShellFolder"
    	POLICY "Remove Favourites from the Navigation Pane (64-bit)"
    	EXPLAIN "Remove Favourites from the Navigation Pane (64-bit)"
    		VALUENAME Attributes
    		VALUEON NUMERIC 2839544064
    		VALUEOFF NUMERIC 2835349760
    	END POLICY
    	
    END CATEGORY
    
    CATEGORY "Windows 7"
    
    	KEYNAME "SOFTWARE\Wow6432Node\Classes\CLSID\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}\ShellFolder"
    	POLICY "Remove Network from the Navigation Pane (64-bit)"
    	EXPLAIN "Remove Network from the Navigation Pane (64-bit)"
    		VALUENAME Attributes
    		VALUEON NUMERIC 2962489444
    		VALUEOFF NUMERIC 2953052260
    	END POLICY
    	
    END CATEGORY
    The entry seems to be changing correctly in the registry, but as the value is normally set with a Hex value I am having to convert from Hex to Decimal. I have read that ADM cannot set Hex values ?

    Anyhow, this doesn't seem to be working!

    @kevicho
    It was applying the policy correctly.
     
    Certifications: CompTIA A+, CompTIA Network+, MCSA: Office 365,, 70-410, 70-680
    WIP: CompTIA: Security+

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.