Announcement

Collapse
No announcement yet.

Set HKCU Reg Key & Values for all users

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Set HKCU Reg Key & Values for all users

    I need to make a registry key change in HKCU for every user that logs in to the Terminal Server, is there a way that I can apply this change to every user account without having to login as each user and manually run the registry update?

    I wrote a powershell script to make the changes, however it won't seem to run on account of it needing admin privileges.. I've also got a .reg file, but I'm assuming that will see the same end.

    Any help would be appreciated.

    __________________________

    It's a 2008 Standard server in a workgroup running as a Terminal Server.
    I've been using this online backup for all my photos, docs, spreadsheets, powerpoints & emails for years now & it works great.
    Go Here for their free 5GB: http://www.idrive.com/p=gavamm
    I upgraded to the Personal Plan for peace of mind for not much more than a cup of coffee.

  • #2
    Re: Set HKCU Reg Key & Values for all users

    Group policy may be an option:
    http://www.tomshardware.co.uk/forum/...y-entries-hkcu
    Tom Jones
    MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
    PhD, MSc, FIAP, MIITT
    IT Trainer / Consultant
    Ossian Ltd
    Scotland

    ** Remember to give credit where credit is due and leave reputation points where appropriate **

    Comment


    • #3
      Re: Set HKCU Reg Key & Values for all users

      Thanks Ossian, I'll check that out

      Hmm, now that I think about it I will also try and run regedit as a command propmt option, ie regedit.exe ...
      That should have been my first thought..
      I've been using this online backup for all my photos, docs, spreadsheets, powerpoints & emails for years now & it works great.
      Go Here for their free 5GB: http://www.idrive.com/p=gavamm
      I upgraded to the Personal Plan for peace of mind for not much more than a cup of coffee.

      Comment


      • #4
        Re: Set HKCU Reg Key & Values for all users

        The Terminal Servers are running Windows Server 2008,, IMHO the best option would be one of,

        1) Use Group poplicy Preferences to modify the user's Registry
        - use loopback policy linked to the Terminal Servers (this is to make sure the script does not run on the fat clients also).

        2) Run a user logonscript through GPO
        - use loopback policy for a GPO linked to the Terminal Servers OU!
        - OR, use a routine in the script to determine if the user is logged on remotely, and link the GPO to the OU containing the user objects.
        (also to make sure the script does not run on the fat clients)


        note,
        When using a logon script you don't have to use a separate reg-file.
        On a configured computer use REG.exe. QUERY to list the keys. Pipe the output to a txt-file. In the Logon script use REG.exe ADD - using the /v "values", /t "values" and /d "values" copied from the temporary txt-file. End each of the REG.exe ADD command lines with: /F


        \Rems

        This posting is provided "AS IS" with no warranties, and confers no rights.

        __________________

        ** Remember to give credit where credit's due **
        and leave Reputation Points for meaningful posts

        Comment


        • #5
          Re: Set HKCU Reg Key & Values for all users

          I agree with Rems, I have successfully managed this using group policy preferences and loopback processing.

          No hassle whatsover.

          Ste
          Steven Roberts
          IT Mercenary

          MCITP:EA|MCTS|MCSE 2003 (Messaging and Security)|MCSA 2003 (Messaging and Security)|MCP|Prince2 Practitioner

          Don't forget to click on the Yin-Yang icon to leave reputation points if you think my advice has been worthwhile!

          Comment


          • #6
            Re: Set HKCU Reg Key & Values for all users

            Thanks guys,

            I can see that registry key on our domain server (Computer Configuration - Windows Settings - Security Settings - Registry), but not on this client server that is in workgroup mode. So I'm assuming this is only available in a domain environment.

            I'll have to go with the registry command line option I was thinking of. Will see if it will allow me to run it through standard users login scripts when they login.
            I've been using this online backup for all my photos, docs, spreadsheets, powerpoints & emails for years now & it works great.
            Go Here for their free 5GB: http://www.idrive.com/p=gavamm
            I upgraded to the Personal Plan for peace of mind for not much more than a cup of coffee.

            Comment


            • #7
              Re: Set HKCU Reg Key & Values for all users

              Hmm, the regedit import triggers UAC which is requiring admin rights to import..
              UAC really is a love/hate relationship..

              Any other ideas guys?

              If all else fails I can put together a step by step procedure and the staff can all make the program change themselves through the menus.. was really hoping to be able to do it myself though.

              _______________________
              Command added to login script: regedit /s \\MySvr\Share\changes.reg
              I've been using this online backup for all my photos, docs, spreadsheets, powerpoints & emails for years now & it works great.
              Go Here for their free 5GB: http://www.idrive.com/p=gavamm
              I upgraded to the Personal Plan for peace of mind for not much more than a cup of coffee.

              Comment


              • #8
                Re: Set HKCU Reg Key & Values for all users

                By Logon Script:
                The command you had added to login script: regedit.exe /s \\MySvr\Share\changes.reg
                should be replaced with: reg.exe import "\\MySvr\Share\changes.reg"

                You can also use reg.exe /ADD ... in a batch (see note in my previous mail), or, you can use vbs to add the entries.



                by GPO:
                The 'Registry' policy that you found under Windows/Security is for setting permissions on an existing key, it cannot be used to add entries.

                Use Group Policy Preferences (this is not available in GPMC on a Windows Server 2003 computer).

                For adding the key by gpo you have 3 options,
                - create a custom ADM
                - Install RSAT on a Vista or 7 client and configure Preferences/Registry
                - On any Server 2008 member server, Add GPMC via:-> Server Manager/Features/ADD/check: Group Policy Management - and configure Preferences/Registry in gpmc.msc on that computer.

                note, when using GPPreferences "Group Policy Preference Client Side Extensions" must be installed on all the targeting machines if their OS is before Vitsa. For your case the terminal servers running 2k8 therefore you don't have to install anything, except for the Group Policy Management Feature on one of your 2k8 machines.


                \Rems
                Last edited by Rems; 21st July 2010, 10:40.

                This posting is provided "AS IS" with no warranties, and confers no rights.

                __________________

                ** Remember to give credit where credit's due **
                and leave Reputation Points for meaningful posts

                Comment


                • #9
                  Re: Set HKCU Reg Key & Values for all users

                  Thanks Rems,

                  I assumed the reg command did the same thing which was why I didn't try that as well.. I'll give it a try.

                  Regarding the GPMC, it is saying that I need to logon as a domain user before I can use the GPMC (it's installed).

                  I've heard about ADM's, thanks for the link, I'll have a look.
                  I've been using this online backup for all my photos, docs, spreadsheets, powerpoints & emails for years now & it works great.
                  Go Here for their free 5GB: http://www.idrive.com/p=gavamm
                  I upgraded to the Personal Plan for peace of mind for not much more than a cup of coffee.

                  Comment

                  Working...
                  X