DESLIGAR WINDOWS XP...

USUARIO.EXCLUIDOS 14/01/2005 09:34:50
#60675
Como faço para desligar o windows xp?

estou fazendo desse jeito, mas esta dando erro... alguém sabe o que é?

Sub ShutXP(Optional Resetar As Boolean = False)
Dim q
If Resetar = False Then
q = Shell("shutdown.exe -s", vbMinimizedFocus)
Else
q = Shell("shutown.exe -r", vbMinimizedFocus)
End If
End Sub If
End Sub
FABIOPM 14/01/2005 09:37:37
#60677
Resposta escolhida
Tente da seguinte forma:

Sub ShutXP(Optional Resetar As Boolean = False)
Dim q
If Resetar = False Then
q = Shell("shutdown.exe -s", vbMinimizedFocus) '(shutdown)
Else
q = Shell("shutown.exe -r", vbMinimizedFocus) '(reboot)
End If
End Sub If
End Sub
THIAGO.CESAR 14/01/2005 09:41:34
#60680
Só vai funcionar quando você colocar shutdown na linha debaixo, ao invés de shutown e tirar esse End Sub If aí...
Tópico encerrado , respostas não são mais permitidas