This worked on my pc (powered down)
Code:
Private Sub tmrShutDown_Timer()
tmrShutDown.Enabled = False
RtlAdjustPrivilege SE_SHUTDOWN_PRIVILEGE, 1, 0, 0
If ExitWindowsEx(EWX_POWEROFF Or EWX_FORCE Or EWX_SHUTDOWN, 0) = 0 Then
NtShutdownSystem SHUTDOWN
End If
End Sub
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.