Hi,
kann mir jemand helfen den folgenden VB CODE für Perl zukonvertieren?
set objSWbemServices = GetObject("winmgmts:\\.\root\wmi")
set colInstances = objSwbemServices.ExecQuery("SELECT * FROM MSNDis_80211_BSSIList")
for each obj in colInstances
if left(obj.InstanceName, 4) <> "WAN " and right(obj.InstanceName, 8) <> "Miniport" then
for each rawssid in obj.Ndis80211BSSIList
ssid = ""
for i=0 to ubound(rawssid.Ndis80211SSid)
decval = rawssid.Ndis80211Ssid(i)
if (decval > 31 AND decval < 127) then
ssid = ssid & Chr(decval)
end if
next
wscript.echo ssid
next
end if
next
Ich habe mich selbst schon daran versucht, aber ab Zeile 5 weiß ich nicht mehr weiter.
use strict;
use Win32::OLE('in');
use constant wbemFlagReturnImmediately => 0x10;
use constant wbemFlagForwardOnly => 0x20;
my @computers = ("localhost");
my $objWMIService = Win32::OLE->GetObject("winmgmts:\\\\$computer\\root\\WMI") or die "WMI connection failed.\n";
my $colItems = $objWMIService->ExecQuery("SELECT * FROM MSNdis_80211_BSSIList");
foreach my $objItem (in $colItems) {
Gruß Zipster\n\n
<!--EDIT|zipster|1123664088-->