Is there a way to shut down a PC (Win 8,1) with VBA

Mike375

Registered User.
Local time
Today, 17:52
Joined
Aug 28, 2008
Messages
2,548
I know it can be done with task scheduling for a set time. However, I am looking for a way whereby the changing the time to shut off is very quick and easy to do as it would be continually done at different times.

I have searched Google high and low but to no avail. I was hoping that I could have some VBA run with the On Timer event. The shut down would have to be done while the computer was either streaming a video or playing a radio station.

One simple way I could do it would be to pull the battery from a laptop and then have it plugged into one of those plugs that you just wind back for 60 minutes or 2 hours etc. before they shut off the power. However, would doing that corrupt Windows 8.1?
 
Many thanks, much appreciated.
 
Galaxioms solution is probably best in this instance but I would recommend AutoHotKey for managing any scripting you need to call outside of MS Access.

This is a link to my blog where I explain in more detail an application I used it for in a web application.

http://rounduptheusualsuspects.org/?p=843
 
I just made a .bat file

shutdown/s

stuck it in a macro and the macro On Time event on form. Open the little data base file and the form on autoexec for open. Worked like a charm with either Youtube or video streaming like Netflix etc. and also radio station playing from their website.

Many thanks again.
 
One of the video streaming applications stopped shutdown/s. A box pops that needs OK clicked.

But shutdown/p went straight through. I suspect because shutdown/s opens a band with a one minute warning to shutdown. However, shutdown/p just goes straight to shutting down.
 

Users who are viewing this thread

Back
Top Bottom