09-08-2009 07:44 AM
Solved! Go to Solution.
09-08-2009 04:28 PM
'InstallBESRLicense.vbs ' Purpose: Installs BESR License Key programatically. ' User must set the sLicenseKey variable. ' Omit dashes when editing the sLicenseKey variable or else ' the script will fail Option Explicit Dim sServerName, sLicenseKey Dim oV2iAuto,oWshShell 'Set License Key -- Omit dashes when editing this variable sLicenseKey = "0000000000000000" 'Set Server Name Set oWshShell = WScript.CreateObject( "WScript.Shell" ) sServerName = oWshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" ) On Error Resume Next 'Connect to server agent and install license key Set oV2iAuto = CreateObject("Symantec.ProtectorAuto") Call oV2iAuto.Connect(sServerName) If Err.Number <> 0 Then Err.Clear WScript.Echo sServerName & ":" & " BESR Agent Connection Failed...skipping license key installation." Else Call oV2iAuto.InstallLicense(sLicenseKey) If Err.Number <> 0 Then Err.Clear WScript.Echo sServerName & ":" & " Problem installing License Key." Else WScript.Echo sServerName & ":" & " Successful License Key Installation" End If End If Set oV2iAuto = Nothing Set oWshShell = Nothing
09-08-2009 04:28 PM
'InstallBESRLicense.vbs ' Purpose: Installs BESR License Key programatically. ' User must set the sLicenseKey variable. ' Omit dashes when editing the sLicenseKey variable or else ' the script will fail Option Explicit Dim sServerName, sLicenseKey Dim oV2iAuto,oWshShell 'Set License Key -- Omit dashes when editing this variable sLicenseKey = "0000000000000000" 'Set Server Name Set oWshShell = WScript.CreateObject( "WScript.Shell" ) sServerName = oWshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" ) On Error Resume Next 'Connect to server agent and install license key Set oV2iAuto = CreateObject("Symantec.ProtectorAuto") Call oV2iAuto.Connect(sServerName) If Err.Number <> 0 Then Err.Clear WScript.Echo sServerName & ":" & " BESR Agent Connection Failed...skipping license key installation." Else Call oV2iAuto.InstallLicense(sLicenseKey) If Err.Number <> 0 Then Err.Clear WScript.Echo sServerName & ":" & " Problem installing License Key." Else WScript.Echo sServerName & ":" & " Successful License Key Installation" End If End If Set oV2iAuto = Nothing Set oWshShell = Nothing
09-09-2009 04:00 AM