Předmět Autor Datum
' Shutdown.vbs ' Example VBScript to Shutdown computers ' Author Josh Murray ' Version 4.1 - Februar…
host 23.10.2010 21:13
host
http://www.google.cz/search?hl=cs&source=hp&q=vbsc ript+pc+shutdown&btnG=Vyhled%C3%A1v%C3%A1n%C3%AD+…
gd 23.10.2010 21:15
gd
díky vám oběma, použil jsem ten návod od gd, zdál se mi kratší, a funguje to! poslední
honzus 23.10.2010 21:26
honzus
' Shutdown.vbs
' Example VBScript to Shutdown computers
' Author Josh Murray
' Version 4.1 - February 2007
' --------------------------------------Option Explicit
Dim objShell, strComputer, strInput
Dim strShutdown

Do
strComputer = (InputBox(" ComputerName to shutdown", "Computer Name"))
If strComputer <> "" Then
  strInput = True
End if
Loop until strInput = True

    strShutdown = "shutdown -s -t 0 -f -m \\" & strComputer

    set objShell = CreateObject("WScript.Shell")

    objShell.Run strShutdown

Wscript.Quit 

http://www.google.cz/search?hl=cs&source=hp&q=vbsc ript+pc+shutdown&btnG=Vyhled%C3%A1v%C3%A1n%C3%AD+G oogle

konkretne http://www.wisesoft.co.uk/scripts/vbscript_shutdow n_a_computer.aspx

strComputer = "." ' Local Computer
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate,(Shutdown)}\\" & _
                strComputer & "\root\cimv2")

Set colOs = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
 
For Each objOs in colOs
    objOs.Win32Shutdown(1)
Next

Zpět do poradny Odpovědět na původní otázku Nahoru