Solved

Convert Reg keys into VBS script

Posted on 2014-10-03
1
214 Views
Last Modified: 2014-10-09
Hi,
Could someone help me convert the following two Reg keys into VBS script? Thank you!


Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Interwoven\WorkSite\8.0\Common\General\Echo]
"ECHO_DIRECTORY"="C:\\NRTEcho"
"ECHO_SIZE"=dword:000007d0

[HKEY_CURRENT_USER\Software\Interwoven\WorkSite\8.0\Common\General\Portable]
"PORTABLE_DIRECTORY"="C:\\NRPortbl"
"DBLIST"="IMANAGE"
0
Comment
Question by:jimmyhtn
1 Comment
 
LVL 20

Accepted Solution

by:
ltlbearand3 earned 500 total points
ID: 40360882
I am assuming you just want a vbscript that can update those registries?  If so, you can use the Wscript.Shell object as one option.  (There are other options, but this is the simpliest looking code)

Give this a shot.

Option Explicit
Dim objShell

Set objShell = CreateObject("WScript.Shell")

objShell.RegWrite "HKEY_CURRENT_USER\Software\Interwoven\WorkSite\8.0\Common\General\Echo\ECHO_DIRECTORY", "C:\\NRTEcho", "REG_SZ"
objShell.RegWrite "HKEY_CURRENT_USER\Software\Interwoven\WorkSite\8.0\Common\General\Echo\ECHO_SIZE", "000007d0", "REG_DWORD"
objShell.RegWrite "HKEY_CURRENT_USER\Software\Interwoven\WorkSite\8.0\Common\General\Portable\PORTABLE_DIRECTORY", "C:\\NRPortbl", "REG_SZ"
objShell.RegWrite "HKEY_CURRENT_USER\Software\Interwoven\WorkSite\8.0\Common\General\Portable\DBLIST", "IMANAGE", "REG_SZ"

msgbox "Registry Updated"

Open in new window

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Recently I finished a vbscript that I thought I'd share.  It uses a text file with a list of server names to loop through and get various status reports, then writes them all into an Excel file.  Originally it was put together for our Altiris server…
Introduction During my participation as a VBScript contributor at Experts Exchange, one of the most common questions I come across is this: "I have a script that runs against only one computer. How can I make it run against a list of computers in …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

860 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