cancel
Showing results for 
Search instead for 
Did you mean: 

BESR 8.5 licence installation

gerry_darroch-1
Level 2
BESR 8.5
 
I can get Altiris to roll out the software to our servers, problem is it sits there wanting the licence code.
 
Any idea how do I automate the installation of the licence key through Altiris?
1 ACCEPTED SOLUTION

Accepted Solutions

marcogsp
Level 6
I don't use Altiris but I understand that it can include VBS scripts as part of the software delivery package and then run the script on the client side. The following VBScript code might suit this purpose.  When calling the script, be sure to use the Wscript.exe InstallBESRLicense.vbs command line syntax or else your delivery package may fail to execute properly.

'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

View solution in original post

2 REPLIES 2

marcogsp
Level 6
I don't use Altiris but I understand that it can include VBS scripts as part of the software delivery package and then run the script on the client side. The following VBScript code might suit this purpose.  When calling the script, be sure to use the Wscript.exe InstallBESRLicense.vbs command line syntax or else your delivery package may fail to execute properly.

'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

gerry_darroch-1
Level 2

Many thanks,  marrco that works.