in reply to Win32::OLE and WMI
... and another one ...use Win32::OLE; $ADsPath = "WinNT://VAD/lanmanserver"; $c = Win32::OLE->GetObject($ADsPath) or die "Невозможно получить $ADsP +ath\n"; $s = $c->Create("fileshare",'ddd-doom'); $s->{path} = 'C:\DOOM2'; $s->{description} = "This is a Perl created share"; $s->SetInfo();
use Win32::OLE; $ADsPath = "WinNT://RU0028/VAD,computer"; $c = Win32::OLE->GetObject($ADsPath) or die "Невозможно получить $ADsP +ath\n"; # создаем и возвращаем объект User $u = $c->Create("user","xx"); $u->SetInfo(); # нужно создать пользователя, перед тем как менять зна +чения # в пространстве имен WinNT: пробел между "Full" и "Name" недопустим $u->{FullName} = "XXX-user!"; $su->SetInfo();
Courage, the Cowardly Dog
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Win32::OLE and WMI
by grmm2 (Acolyte) on Feb 02, 2004 at 15:14 UTC | |
by Courage (Parson) on Feb 02, 2004 at 18:16 UTC | |
by grmm2 (Acolyte) on Feb 03, 2004 at 08:44 UTC | |
by Courage (Parson) on Feb 03, 2004 at 11:34 UTC |