When the Amt LionRepository Module will be used on a machine which does not have an installed AMT Environment, it is necessary to copy the Amt LionRepository Module library files to this machine.
To do this copy the contents of the folder <Your AMT Environment>\Lion\LionRepository, on a server with an installed AMT Environment, to a folder on the machine the Amt LionRepository Module will be used.
| Please be aware that the Amt ComScript Module has limited functionality in non .NET languages due to restrictions of COM services. As such the module should only be used in non .NET languages to maintain legacy applications. |
Before the LionRepository Module can be used in a Visual Basic (Script) program it first has to be registered as a COM service in the Windows Operating System.
regsvr32.exe <Path to LionRepository
Module>\LionRepository.comhost.dllThe <Path name> must refer to the directory to where you
have copied the concerned dll-files. Regsvr32.exe can be found in the C:\Windows\System32 folder.
Note that on a 64-bit version of the Windows operating system, there are two versions of the Regsv32.exe file:
Be sure to use the correct version of Regsvr32.exe depending on the application that will use the Amt LionRepository Module.
It is important when upgrading AMT to a new fix or patch to first unregister the old LionRepository module with
the commandregsvr32.exe /u <Path to LionRepository
Module>\LionRepository.comhost.dll and then register the new version after AMT was
upgraded.
|
To unregister older .NET framework versions of the LionRepository Module, the following command can be used:
|
When starting the Visual Basic program the LionRepository Module has to be loaded into memory and an object of the basic LionRepository class has to be created. The code to do this is:
Set ReposModule = CreateObject("Asysco.Lion.Repository.Model.LionRepository")|
The LionRepository Module requires at least PowerShell version 7.6.1, recommended is the
newest 7.6.* version, when using the Module in a PowerShell script.
|
# First load both the AMT Library dll and the LionRepository Module dll
Add-Type -Path '<Path to LionRepository Module>\Asysco.Amt.Libs.dll'
Add-Type -Path '<Path to LionRepository Module>\LionRepository.dll'
# Then create a LionRepository Module object
$Obj_Module = New-Object Asysco.Lion.Repository.Model.LionRepository
Open (Create) the project to use the Com Module in, in Visual Studio. Then right click the References node of the project and click 'Add Reference'. Browse to the folder <Path to LionRepository Module> and add a reference to the LionRepository.dll.
The LionRepository Module can then be used in the code of the project.
We advise adding the 'using Asysco.Lion.Repository.Model;' and
'using Asysco.Lion.Repository.Interfaces;' directives to every code file the LionRepository
Module will be used in.
|