(imported topic written by mcmaurer91)
Hello,
I’m doing some BigFix/TEM testing and trying to make use of the PlatformAPI with PERL.
I’ve been able to successfully import a .bes file using the ImportFile.pl example, but when I try to load a RetrievedProperty (eventually I’d like to modify them programatically), I get stuck with a pretty generic error message:
$ ./setPromise.pl BES_BFenterprise 'C:\Users\Administrator\My Documents\BESCredentials\mcmaurer\
\publisher.pvk’
here
here2
Win32::OLE(0.1709) error 0x8002000e: “Invalid number of parameters” in METHOD/PROPERTYGET “CurrentFIPSMode”
Here’s my code:
#!/usr/bin/perl use strict; use warnings; use FindBin; use lib $FindBin::Bin; use BESAPI; use Data::Dumper;
if ( @ARGV != 4 )
{ print
"ImportFile.exe <username> <password> <dsn> <private key path>"; exit ( 0 );
} my ( $username, $password, $dsn, $privateKey, $besFile, ) = @ARGV; print
"here\n"; my $check = BESAPI::CheckSigningKeys ( $dsn, $username, $password, $privateKey ); my $retProp = BESAPI->
new (
"RetrievedProperty" ); print
"here2\n"; print
"Initial: " . Dumper $retProp; print
"here3\n"; my $ids = $retProp->load ( 235, $username, $password ); print
"here4\n"; print
"IDs: " . Dumper $ids; print $ids; print
"IDs: " . join (
" ", @$ids ) .
"\n";
if ( $@ )
{ print
"$@\n";
} 1;
It seems to be dying during the object creation…
I’m able to use the TestAPI.htm page fine as well. So maybe this is related to my perl install? I’m using cygwin and CPAN’s Win32::OLE module.