HI folks

script should work in 2 steps.

1) It should delete values in Browser and Client_Name under HKEY_LOCAL_MACHINE\SOFTWARE\Veritas\NetBackup\CurrentVersion\Config

2) It should update values in  Browser and Client_Name as SERVERNAME under HKEY_LOCAL_MACHINE\SOFTWARE\Veritas\NetBackup\CurrentVersion\Config


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

1 Comment   [ + ] Show Comment


  • thanks austin. Further addition how can script write logs\errors at location C:\Temp\nbuscript
Please log in to comment



You can use the RegRead,RegWrite,RegDelete methods of the WSCript.Shell object. For example:

Set WshShell = CreateObject("WScript.Shell")
SERVERNAME = "MYSERVER" WshShell.RegDelete "HKLM\SOFTWARE\Veritas\NetBackup\CurrentVersion\Config\Browser"
WshShell.RegDelete "HKLM\SOFTWARE\Veritas\NetBackup\CurrentVersion\Config\Client_Name" myKey = "HKLM\SOFTWARE\Veritas\NetBackup\CurrentVersion\Config\"
WshShell.RegWrite myKey & "Browser",SERVERNAME,"REG_SZ"
WshShell.RegWrite myKey & "Client_Name",SERVERNAME,"REG_SZ" Set WshShell = Nothing

Really, though, there's no need to use the RegDelete, as the RegWrite will overwrite the value. You could also include a RegRead to verify whether or not the values are already up to date

Answered 12/26/2013 by: BHC-Austin
Fourth Degree Black Belt

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