wsh
Модератор: Модераторы
Сообщений: 4
• Страница 1 из 1
- Stratofortress
- хм...
-
- Сообщения: 611
- Зарегистрирован: 07 апр 2004, 17:10
- Откуда: ссср
Код | ||
Set WshShell = WScript.CreateObject("WScript.Shell") Set objArgs = WScript.Arguments ' This line actually connects to WBEM on the desired server to the process environment ' I created it as a varible because it had problems inside the GetObject winmgmt1 = "winmgmts:{impersonationLevel=impersonate}!//" & server & "/root/cimv2:Win32_Process" Set process = GetObject(winmgmt1) ' Execute the process. If it works you will get a net send message. ' If not it will give you the method failed message, and you must make sure to ' run WBEMPERM on the desired machine to make sure you have WBEM authority. If (process.Create(proc, Null, Null, processid)) = 0 Then wscript.echo "executed successfully" Else wscript.echo "Method failed" If Err <> 0 Then WScript.echo Err.Description, "0x" & Hex(Err.Number) End If End If [/code] нет времени разбираться — наймите того, кто знает.
|