Private Declare Function InitiateSystemShutdown Lib _
"advapi32.dll" Alias "InitiateSystemShutdownA" (ByVal _
lpMachineName As String, ByVal lpMessage As String, _
ByVal dwTimeout As Long, ByVal bForceAppsClosed As Long, _
ByVal bRebootAfterShutdown As Long) As Long
Private Declare Function AbortSystemShutdown Lib "advapi32.dll" _
Alias "AbortSystemShutdownA" (ByVal lpMachineName As _
String) As Long
Private Sub Command1_Click()
'Proses Shutdown PC
InitiateSystemShutdown "127.0.0.1", "KOMPUTER AKAN MATI", _
30, True, True
End Sub
Private Sub Command2_Click()
'PRoses Pembatalan Shutdown Komputer
AbortSystemShutdown "127.0.0.1"
End Sub
Selasa, 05 Januari 2010
Shutdown PC with Script VB 6.0
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar