HI folks

I need a VBscript (simply .vbs extention file which i can place on server windows 2003 or windows 2008). So any user with administrative rights can just double client and run it.

First when admin user runs the script it should ask Browser value and then Client_Name value. Then entered value should be updated in registry.


It should replace any existing values in  Browser and Client_Name as entered by user under HKEY_LOCAL_MACHINE\SOFTWARE\Veritas\NetBackup\CurrentVersion\Config

It should also update logs(bascically values entred by user in log file at location C:\Temp\nbuscript

OR another way.

admin user simply put 2 values(first value Browser, second value Client_Name) in a notepad file C:\Temp\value  then VBScript updates both values under location 


then write logs at location C:\Temp\nbuscript

I am a newbie in vbscript so need spoonfeeding at scripting level. Any help would be much appreciated.

0 Comments   [ + ] Show Comments


Please log in to comment



I super suck at scripting but I would break it down to little bits then join it all together. Just to note one last time, i super suck at scripting.

*have a read of this, sometimes if it dosent work you might have forgotten to DIM the var.

Use Notepad++, it highlights the code etc so its easier to read, it also helps with the ""escaping quotes thing.

This bit of code helps with debugging, it just spews out the value of the var, so just put in in somewhere, where you need to check the value.
WScript.Echo "strInput var value is: " & strInput


Look at this, if you launch it like (shortcut) wscript.exe your_script.vbs, it will give you a nice GUI box rather than a sh*tty cmd prompt for input.

From what i learned in the past, there are a few ways to write to the registry, I found a WMI object easy to use, but it tends to crap out every now and then so you need to add in error checking (to check WMI is ok, but add in error checking after you have something working).
Mod this to your needs

There is also thise method, but I didnt use it for some reason or another

Logging should be easy, just appending to file
Not sure if this will create the file at the start though.



Answered 01/05/2014 by: rileyz
Red Belt

Please log in to comment

try below vb script.

Option Explicit

Dim SysVarReg, Value

Dim Input

Input = InputBox("Enter your name") 

Value = Input


Set SysVarReg = WScript.CreateObject("WScript.Shell")

SysVarReg.RegWrite "HKCU\vijay\vijay1\123", Value


give your full HKCU\HKLM path.

Answered 01/06/2014 by: vjay
Second Degree Blue Belt

Please log in to comment
Answer this question or Comment on this question for clarity