Solved

Convert Reg keys into VBS script

Posted on 2014-10-03
1
198 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

I met Paul Devereux (@pdevereux) today when I responded to his tweet asking “Anybody know how to automate adding files from disk to a folder in #outlook  ?”.  I replied back and told Paul that using automation, in this case scripting, to add files t…
This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

757 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now