"jc" <[EMAIL PROTECTED]> writes:

> A little time ago one of you send the following script :

[snip]

> # Get a handle to the SWbemServices object of the machine.
> my $computer = Win32::OLE->GetObject (exists $opts{'remote'}
>                                       ? "WinMgmts://$opts{'remote'}/"
>                                       : 'WinMgmts:');

[snip]

> It works very fine on my computer (workstation Win 2000), but as
> soon as I run it on a server of my network (Nt4 server), it returns
> Win32::OLE errors (lines in red) :
>  
> WIn32::OLE(0.1601) error 0x800401e4 "syntaxe non valide" after caracter
> 0 in "WinMgmts:", eval{...} called

As someone else mentioned, you may need to download and install WMI on
Windows NT.  (Although I thought it was bundled with service pack 4 or
something...)

Another possibility is that the abbreviated monikers are not working;
see:

  
http://msdn.microsoft.com/library/library/en-us/wmisdk/wmi/using_defaults_for_more_concise_code.asp

and

  http://msdn.microsoft.com/library/en-us/wmisdk/wmi/constructing_a_moniker_string.asp

If you change 'WinMgmts:' to 'WinMgmts:{impersonationLevel=impersonate}',
perhaps that will help.

 - Pat
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to