C
cj
If TimeValue(Now) > TimeValue(ShutdownTime) Then
Dim WMIService, Computer As Object
WMIService =
GetObject("Winmgmts:{impersonationLevel=impersonate,(Debug,Shutdown)}")
For Each Computer In WMIService.InstancesOf("Win32_OperatingSystem")
Computer.Win32Shutdown(8 + 4, 0) 'shutdown
Next
End If
My problem is it doesn't work on ME. Well, it prompts me for a
password. I don't use passwords on my old ME pc. Any help would be
appreciated. It's an old pc but it still serves it function and it
would be nice to modify one of my programs on it to shut it down
automatically.
Dim WMIService, Computer As Object
WMIService =
GetObject("Winmgmts:{impersonationLevel=impersonate,(Debug,Shutdown)}")
For Each Computer In WMIService.InstancesOf("Win32_OperatingSystem")
Computer.Win32Shutdown(8 + 4, 0) 'shutdown
Next
End If
My problem is it doesn't work on ME. Well, it prompts me for a
password. I don't use passwords on my old ME pc. Any help would be
appreciated. It's an old pc but it still serves it function and it
would be nice to modify one of my programs on it to shut it down
automatically.