?
Solved

Need a vbscript to copy/paste registry keys

Posted on 2010-01-06
3
Medium Priority
?
1,117 Views
Last Modified: 2012-05-08
Hi,

We have a problem with some proxy settings on a 64bit Win2008 server. A microsoft kb article tells me how to fix it, but the instruction says to write a script, which is beyond me.

Can someone please write a script (preferably vbs) which will do the following:

To work around this issue, follow these steps:

   1. Create a script that reads the contents from the following registry subkey:
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings
   2. In the same script, add code that writes the contents of the registry subkey in step 1 to the following registry subkey:
      HKLM\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Internet Settings
   3. Run the script.
   4. Make sure that you grant all users (everyone) the Set Value permission for the following registry subkey:
      HKEY_LOCAL_MACHINE\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\Connections

Thanks.
0
Comment
Question by:MDWinter
  • 2
3 Comments
 
LVL 5

Expert Comment

by:Netcraft
ID: 26191706
You must be talking about KB95203. This says that you have to copy about 4000 keys and values.

The easiest way would be to export the wanted key using Regedit. editing the .reg file and replacing the old key with the new key, saving the .reg file, and importing it back. And manually changing the permissions of the Connections key.

How many servers are we talking about?

A workaround seems to be to make the proxy settings per-user (rather than per-machine). Have you tried this?

I think that it may also work if you modify the inetset.adm file and change the proxy key to the WOW6432Node location.
0
 

Author Comment

by:MDWinter
ID: 26358222
Yes, we are talking about KB 952031.

It's only one server.

Can you please explain what you mean by:

"The easiest way would be to export the wanted key using Regedit. editing the .reg file and replacing the old key with the new key, saving the .reg file, and importing it back. And manually changing the permissions of the Connections key"

as I don't realy understand what you mean...
0
 
LVL 5

Accepted Solution

by:
Netcraft earned 2000 total points
ID: 26456040
- Start REGEDIT
- Go to the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings
- Choose File, Export en save the keys to a file
- Close REGEDIT
- Open this file using NOTEPAD
- Replace "HKEY_LOCAL_MACHINE\Software" with "HKEY_LOCAL_MACHINE\Software\WOW6432Node"
- Save the file
- Import the file by double-clicking it and choosing Yes.
- Start REGEDIT
- Go to the key HKEY_LOCAL_MACHINE\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\Connections
- Right-click the Connections key
- Choose Permissions
- Choose Advanced
- Select the line with "Users"
- Choose Edit
- Put a check after the line "Set Value"
- Click Ok three times
- Close REGEDIT
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
Suggested Courses

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question