Pure Automation Documentation..

The technical support forum for Firestreamer (the virtual tape library).
Locked
jakarto
Posts: 3
Joined: 04 May 2011, 10:07

Post by jakarto »

Hello,

I am Using Powershell

$libraryNumber = 1
$file = "C:\200-900Max.fsmap"
$FiCo.ChangerLoadMediaFromFile $libraryNumber, $file

Wenn i try to load a fsmap file I get this error:

Unexpected token 'libraryNumber' in expression or statement.
At line:1 char:46
+ $FiCo.ChangerLoadMediaFromFile $libraryNumber <<<< , $file
+ CategoryInfo : ParserError: (libraryNumber:String) [], ParentCo
ntainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken

Because the Documentation of the Automation intaface is so poor a dont know whats wrong.

Does anybody have a better Documentation?

Thanks
jsf
Cristalink Support
Posts: 300
Joined: 29 Aug 2010, 09:03

Post by jsf »

The problem has nothing to do with Firestreamer. I guess you need to enclose the parameters in parentheses: $FiCo.ChangerLoadMediaFromFile ($libraryNumber, $file)

See a sample script here .
Best regards,
John Smith
Cristalink Support
jakarto
Posts: 3
Joined: 04 May 2011, 10:07

Post by jakarto »

Sorry but No!

1. I dont want to use com (Because of COM limitations, the COM interface is less powerful than the .NET one, however, it is able to perform basic Firestreamer operations.)

Ok from Start:

[System.Reflection.Assembly]::LoadFile("c:\\Program files\\Cristalink\\Fschanger\\firestreamerInterface.dll")
$FiCo = New-Object -TypeName Firestreamer.Driver.Controller
$FiCo.Connect()

Didnt work ..
The following exception occurred while retrieving member "Connect": "Could not load file or assembly 'CristalinkNUtl, V
ersion=4.0.0.0, Culture=neutral, PublicKeyToken=7cad3aa6c4574e02' or one of its dependencies. The system cannot find th
e file specified."
At line:1 char:14
+ $FiCo.Connect <<<< ()
+ CategoryInfo : NotSpecified: (:) [], ExtendedTypeSystemException
+ FullyQualifiedErrorId : CatchFromBaseGetMember

'-------------------------------------------
'
' com.vbs
'
' Before using the Firestreamer COM interface, you need to register it first with the following command line:
'
' For a 32-bit operating system:
' C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe /codebase "C:\Program Files\Cristalink\FsChanger\FirestreamerInterface.dll"
'
' For a 64-bit operating system:
' C:\Windows\Microsoft.NET\Framework64\v2.0.50727\RegAsm.exe /codebase "C:\Program Files\Cristalink\FsChanger\FirestreamerInterface.dll"
'
'-------------------------------------------
Why ? I dont want to use the Com interface!
But ok i've registered it .. Error is not gone!

What I need (and I think a lot of other People too) is a complete Documentation auf the Interface with all Functions and Parameters ... for .NET

Thanks in advance
jakarto
Posts: 3
Joined: 04 May 2011, 10:07

Post by jakarto »

[quote="js"]The problem has nothing to do with Firestreamer. I guess you need to enclose the parameters in parentheses: $FiCo.ChangerLoadMediaFromFile ($libraryNumber, $file)

See a sample script [url=http://support.cristalink.com/forum/vie ... p?f=3&t=28]here[/url] .[/quote]

BTW: This is not a Sample Script ;-)

The First words are...

I have written a powershell script to detect this but I'm having problems connecting to the firestreamer .net interface. Has anyone got a guide on connectiong to the firestreamer.driver.controller and the syntax for the commands available. The web page lists the com object syntax but when connection to that using powershell I'm getting an error.

Same Problem .. no answer!

Thanks
jsf
Cristalink Support
Posts: 300
Joined: 29 Aug 2010, 09:03

Post by jsf »

Again, it has little to do with Firestreamer itself. It's about the knowledge of PowerShell in general and the usage of .NET from PowerShell in particular. Use the following code to load Firestreamer assemblies. You don't have to register them first.

Code: Select all

[System.Reflection.Assembly]::LoadFrom("c:\Program files\Cristalink\FsChanger\FirestreamerInterface.dll")

$FiCo = New-Object Firestreamer.Driver.Controller
Write-Host "InterfaceVersion =" $FiCo.InterfaceVersion

$FiCo.Connect()
Write-Host "DriverVersion =" $FiCo.GetDriverVersion()
As to the Firestreamer API interface, please refer to Automation. The sample script demonstrates the usage of all the functions that you need. If you are familiar with the PowerShell syntax, it should be easy to convert .VBS to .PS1. Feel free to ask further questions.
Best regards,
John Smith
Cristalink Support
Locked