I'm opening a WMI connection to a remote Windows server as follows:

my $loc = Win32::OLE->new("WbemScripting.SWbemLocator") or die;
my $conn = $loc->ConnectServer($server, "root/citrix", $username, $password) or die;
my $resultSet = $conn->ExecQuery("select * from MetaFrame_Server");

After awhile I can no longer connect to the server. The connection just times out. Restarting the WMI service on the remote server fixes the problem, however.

My question is, do I need to clean up the locator, connection, or result set? I don't see any examples of any cleanup in Microsoft's VBScript or JScript examples, nor in any Perl examples I can find.

Does anyone know why the WMI service might stop accepting connections, or whether there's something in my script that could be causing it?

Thanks!
Brian Atkins
Indicative Software, Inc.

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to