Announcement

Collapse
No announcement yet.

Changing from Reg file to Script.

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

  • Changing from Reg file to Script.

    Hi. Would anyone reading this know how to convert this Registry file as shown into a script to run on Windows 7 Professional? Or is there a software that does converts all kinds of registry files to scripts & scripts to a registry file? Kindly advise, thanks. Any useful help is appreciated. Don't give rubbish, thanks.

    ========

    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Win dows NT]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Win dows NT\Printers
    \PackagePointAndPrint]
    "PackagePointAndPrintServerList"=dword:0000000 0
    "PackagePointAndPrintOnly"=dword:00000000

    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Win dows NT\Printers\PointAndPrint]
    "Restricted"=dword:00000000
    "TrustedServers"=dword:00000000
    "InForest"=dword:00000000

  • #2
    Re: Changing from Reg file to Script.

    What exactly are you trying to achieve?
    A .REG file holds changes to the registry -- are you wanting a script to make the same changes? If so, a simple cmd file to run the .REG file will do
    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: Changing from Reg file to Script.

      I need to add this & push down to all my Windows 7 clients but if I do it as

      a registry file it requires an Admin account & password. I try to do this silently. And I've already tried to do a silent run of regedit /s it doesn't work still. And it's ONLY happening on Windows 7. So that's why. And good advise is appreciated. Thanks.

      Comment


      • #4
        Re: Changing from Reg file to Script.

        So can you use VBS (see this article for more detail: http://www.tomshardware.com/reviews/...ript,1574.html) and roll it out as a startup script via GPO?
        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


        • #5
          Re: Changing from Reg file to Script.

          But I've read in some articles & even on Microsoft sites that Windows Server 2003's GPO cannot deploy down to Windows 7 clients. Only Windows Server 2008 R2 can. So is there a work around this limitation? Thanks for your input.

          Comment


          • #6
            Re: Changing from Reg file to Script.

            I have neverhad a problem with scripts deploying to Win7 clients -- why not try it?
            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


            • #7
              Re: Changing from Reg file to Script.

              You have no problems? Can I know what security settings you're having for your clients? Or there's none at all? Because it can't be that we're both using Windows 7 with a similar if not identical settings & have different outcomes. I also don't believe that I'm the ONLY one Administrator facing this issues.

              OK. My company is trying to play it on the safe side. We are having the clients to have the highest security in their UAC. Is it possible that with that kinds of configuration a script still be be able to run silently in the background & still do it's thing without prompting? Kindly suggest. No worries if it sounds silly as long as it works, it's worth a try, thanks.

              Comment


              • #8
                Re: Changing from Reg file to Script.

                We are talking about logon scripts?
                Security would be more or less default domain settings -- I rarely have to apply more restrictive templates
                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


                • #9
                  Re: Changing from Reg file to Script.

                  Originally posted by mklchan View Post
                  I need to add this & push down to all my Windows 7 clients but if I do it as

                  a registry file it requires an Admin account & password. I try to do this silently. And I've already tried to do a silent run of regedit /s it doesn't work still. And it's ONLY happening on Windows 7. So that's why. And good advise is appreciated. Thanks.
                  When regedit.exe is used then in Vista and Windows 7 you'll get the UAC prompt. Instead use Reg.exe statements in the batch.

                  example how to merge registry entries from a Registry file (*.reg file):
                  Code:
                  Reg.exe IMPORT "\\server\share\MyEntries.reg"
                  Or, use Reg.exe ADD (+ Force overwriting!) to add the entries one by one:
                  Code:
                  Set "RegKey=HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Printers\PackagePointAndPrint"
                  Reg.exe ADD "%RegKey%" /v "PackagePointAndPrintServerList" /t REG_DWORD /d 0 /f
                  Reg.exe ADD "%RegKey%" /v "PackagePointAndPrintOnly" /t REG_DWORD /d 0 /f
                  
                  Set "RegKey=HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Printers\PointAndPrint"
                  Reg.exe ADD "%RegKey%" /v "Restricted" /t REG_DWORD /d 0 /f
                  Reg.exe ADD "%RegKey%" /v "TrustedServers" /t REG_DWORD /d 0 /f
                  Reg.exe ADD "%RegKey%" /v "InForest" /t REG_DWORD /d 0 /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


                  • #10
                    Re: Changing from Reg file to Script.

                    Hi Rems. I've tried the code that you've put there. It kind of does it thing, but there's an error when I run it as a batch file. The error is as follows on every line.

                    ERROR: Access is denied.

                    So it's getting warmer but still not working yet. Is it possible from the code that you did be changed to a script instead? Then it WILL be great! Thanks.

                    Melvin

                    Comment


                    • #11
                      Re: Changing from Reg file to Script.

                      Originally posted by mklchan View Post
                      Hi Rems. I've tried the code that you've put there. It kind of does it thing, but there's an error when I run it as a batch file. The error is as follows on every line.

                      ERROR: Access is denied.

                      So it's getting warmer but still not working yet. Is it possible from the code that you did be changed to a script instead? Then it WILL be great! Thanks.

                      Melvin
                      Tried running it as Computer Startup Script? What are the permissions on that key?


                      /Rems
                      Last edited by Rems; 12th August 2011, 09:38.

                      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


                      • #12
                        Euraka! I got the answer to my own question.

                        Hi people I got the answer to this question that I've posted myself.
                        http://www.pcreview.co.uk/forums/q-m...t-t602979.html
                        Enjoy.

                        Comment

                        Working...
                        X