Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GetObject("winMgmts:{(Shutdown)}\\" & p_strComputerName)

43 views
Skip to first unread message

eric

unread,
Dec 22, 2002, 8:24:35 AM12/22/02
to
Hello,

I found how reboot a PC, by the command "GetObject("winMgmts:{(Shutdown)}\\"
& p_strComputerName)" but why "{(shutdown)}".
For me i just need this code without "{(shutdown)}".

p_objWbemRoot = GetObject("winMgmts:\\" & p_strComputerName)

p_colComputers = p_objWbemRoot.ExecQuery("Select * from
Win32_OperatingSystem")

For Each p_objComputer In p_colComputers

p_lngRtn = p_objComputer.Win32Shutdown(p_lngIndex)

Next

If someone can help me, thanks

eric


Ivan Brugiolo [MSFT]

unread,
Dec 22, 2002, 8:59:26 PM12/22/02
to
Non enabled privileges are stripped across a LRPC call
(that is the transport used by DCOM-RPC in the local connection case),
while the privileges at the other side of a DCOM-RPC call over TCP (it's the
OSF code path)
are the one estabilished by the policy of the remote machine,
and generally all the available privileges in the local case are propagated
AND enabled in the remote case.

--
This posting is provided "As Is" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


<eric> wrote in message news:efJ211bqCHA.1624@TK2MSFTNGP10...

0 new messages