Discipulus has asked for the wisdom of the Perl Monks concerning the following question:
I know this is a basic/stupid question about obj but now I'm in a fixuse Win32::OLE qw(in); my $ip="192.168.0.5"; my $obj=Win32::OLE->GetObject("IIS://$ip")||warn Win32::FormatMessage( +Win32::OLE->LastError());#ok print"obj vale $obj\n";#=obj give Win32::OLE=HASH(0x1abf0dc) #now I want to get IIS://192.168.0.5/W3SVC # how ? #my @w3=$obj->GetObject("W3SVC")..gives 'invalid # of param' #my @w3=$obj->{"/W3SVC"}.. gives member not found my @w3=$obj->("W3SVC")||warn Win32::FormatMessage(Win32::OLE->LastErro +r()); foreach $ele(in @w3) { print "$ele->{Name}\n"; if ($ele->{ServerComment} !~/Microsoft IIS Administration|Default +Web Site|DellPAWWAdminTool|Administration Web Site/) {if ( $ele->{Name}=~/\b\d+\b/){push (@listaw3, $ele->{Name})} } } print "@listaw3";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: reuse of Win32::OLE object
by BrowserUk (Patriarch) on Jan 27, 2004 at 11:53 UTC | |
by Discipulus (Canon) on Jan 27, 2004 at 12:05 UTC |