Announcement

Collapse
No announcement yet.

Script for run a Reg Modification

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

  • Script for run a Reg Modification

    A big hello to everybody here.

    This is my first question.

    I have some key in the registry that i need to change in my domain (more than 1k computers) and i can not use the sysvol folder for that because no all use have the need it privileges ti run it.

    As i already create a reg file, i need a way to apply this file settings to all computers in my domain, i dont know how can i do this, so i'm looking for :

    An application that do this
    or
    An script
    or
    A WMI script
    or
    you name it.


    Regards and Thank you
    When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been and there you will always long to return.

    Leonardo da Vinci

  • #2
    Re: Script for run a Reg Modification

    script: deployreg.cmd

    Code:
    @echo off
    runas /user:domain\scriptrunner /password:p45sw0rD REG import <filename>
    Create an AD user called scriptrunner and place him in a group which has Workstation Admin access to all machines, but has no domain based rights (for example domain\WkStn-Admins).

    Put the lines above into the login or startup script - depending if it's a HKLM registry key or a HKCU key. Put the REG key in the same folder as the script.


    Tom
    For my own and your protection, I do not provide support by private message under any circumstances. All such messages will be deleted and ignored.

    Anything you say will be misquoted and used against you

    Comment


    • #3
      Re: Script for run a Reg Modification

      Humm It not working

      First i ran as you told me
      Code:
      @echo off
      runas /user:domain\scriptuser /password:p45sw0rD REG import <filename>
      without the <> and with it

      later i change it to
      Code:
      @echo off
      runas /user:[email protected] /password:p45sw0rD REG import <oracle.reg>
      and without the <>

      and then to
      Code:
      runas /noprofile /user:[email protected] /password:p45sw0rD REG import <oracle.reg>
      and without the <>

      In the last one don't give me the error of as how i should run the "Runas" command, just did it but without modified the registry key or without create it.

      Thank you again and please excuse my poor English skills
      When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been and there you will always long to return.

      Leonardo da Vinci

      Comment


      • #4
        Re: Script for run a Reg Modification

        OK, first of all, you don't need the <>.

        Follow the steps below:

        1. Create a user called "scriptuser" with the password p45sw0rD

        2. Create a file called "oracle.reg" in the SYSVOL\<domain>\scripts folder with the new registry information in it and in the correct reg file format. Make sure you use "Notepad" to create the file.

        3. Create a new CMD file in the SYSVOL\<domain>\scripts folder called "deployreg.cmd" as follows:
        Code:
        @echo off
        echo p45sw0rD|runas /user:domain\scriptuser REG import oracle.reg
        4. For testing, change the logon script field in a single user account properties on the "profile" tab to "deployreg.cmd".

        5. Log in as the user. It SHOULD work. I think.

        I'll do some more testing and get back to you...


        Tom
        For my own and your protection, I do not provide support by private message under any circumstances. All such messages will be deleted and ignored.

        Anything you say will be misquoted and used against you

        Comment


        • #5
          Re: Script for run a Reg Modification

          Hello.

          First many thank for your help, indeed i really appreciate .

          I know that this is the procedure that i need to follow when i begin to applicate it to my domain, but first and testing in my PC, login with my credential, also this user right now have local privileges.

          With this new changes i received the same, maybe because i'm not login with this user account.

          I doing some more test.
          When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been and there you will always long to return.

          Leonardo da Vinci

          Comment

          Working...
          X