Thread WIN2000: läuft ein bestimmtes Programm gerade? (3 answers)
Opened by ronald at 2006-06-22 10:14

esskar
 2006-06-23 22:37
#67556 #67556
User since
2003-08-04
7321 Artikel
ModeratorIn

user image
schau mal, ob dir eins der folgenden Script hilft:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use strict;
use Win32::OLE('in');

use constant wbemFlagReturnImmediately => 0x10;
use constant wbemFlagForwardOnly => 0x20;

my @computers = ("SK");
foreach my $computer (@computers) {
print "\n";
print "==========================================\n";
print "Computer: $computer\n";
print "==========================================\n";

my $objWMIService = Win32::OLE->GetObject("winmgmts:\\\\$computer\\root\\CIMV2") or die "WMI connection failed.\n";
my $colItems = $objWMIService->ExecQuery("SELECT * FROM Win32_ShareToDirectory", "WQL",
wbemFlagReturnImmediately | wbemFlagForwardOnly);

foreach my $objItem (in $colItems) {
print "Share: $objItem->{Share}\n";
print "SharedElement: $objItem->{SharedElement}\n";
print "\n";
}
}


Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
use strict;
use Win32::OLE('in');

use constant wbemFlagReturnImmediately => 0x10;
use constant wbemFlagForwardOnly => 0x20;

my @computers = ("SK");
foreach my $computer (@computers) {
print "\n";
print "==========================================\n";
print "Computer: $computer\n";
print "==========================================\n";

my $objWMIService = Win32::OLE->GetObject("winmgmts:\\\\$computer\\root\\CIMV2") or die "WMI connection failed.\n";
my $colItems = $objWMIService->ExecQuery("SELECT * FROM Win32_Share", "WQL",
wbemFlagReturnImmediately | wbemFlagForwardOnly);

foreach my $objItem (in $colItems) {
print "AccessMask: $objItem->{AccessMask}\n";
print "AllowMaximum: $objItem->{AllowMaximum}\n";
print "Caption: $objItem->{Caption}\n";
print "Description: $objItem->{Description}\n";
print "InstallDate: $objItem->{InstallDate}\n";
print "MaximumAllowed: $objItem->{MaximumAllowed}\n";
print "Name: $objItem->{Name}\n";
print "Path: $objItem->{Path}\n";
print "Status: $objItem->{Status}\n";
print "Type: $objItem->{Type}\n";
print "\n";
}
}

View full thread WIN2000: läuft ein bestimmtes Programm gerade?