View Single Post
  #4  
Old August 24th 20, 12:31 AM posted to alt.comp.os.windows-10,alt.comp.microsoft.windows,alt.comp.hardware
VanguardLH[_2_]
external usenet poster
 
Posts: 1,453
Default Is there an option to completely shut off a Windows 10 desktop (not just go to sleep, hibernate, or fastboot)?

Arlen Holder wrote:

How can we set Windows to completely shut off after a period of
inactivity?


Add an event to Task Scheduler.

- Action:
Run: shutdown.exe
Args: /s /t
- Run the event with elevated privileges.
- Conditions:
Start the task only if the computer is idle for N, where
N is 1, 5, 10, 15, 30 minutes or 1 hour.

When the event runs (to then wait until the computer is idle) is also up
to you.

- After a specific time.
- Repeat task every X, where X is the same, or longer, than N.
- On an event, like the screen saver locking the screen.

You can combine the first two conditions, so the computer will shutdown
only after a specified time but keep retrying every X minutes
thereafter. You'll also want to define and end time to prevent the
event from trying to shutdown the computer when you start using it the
next day, unless you still want to shutdown if you're not around the
next day, too.

I use the lockscreen event to trigger running a scheduled task, so I
know that works. I have the screensaver lock the workstation (so a
password is need to resume use). I don't want to be awakened by sound
events when I'm sleeping (the computer is in my large bedroom), so I
have a scheduled event that runs Nirsoft's nircmd.exe program with args
to enable/disable system sounds. The workstation lock is triggered by
the screensaver configured to lock when it activates.

Mute on event:
Trigger: on workstation lock
Action: path\nircmd.exe mutesysvolume 1

I could use the Activate and Expire trigger options if I wanted to mute
only at night when I'm sleeping. However, I'm retired, so I don't know
when I'll be sleeping. My hours are highly irregular. This means
system sounds are muted anytime the event fires, including during the
day. Having a quiet locked computer is okay with me.

Mute off event:
Trigger: on workstation unlock
Action: path\nircmd.exe mutesysvolume 0

When I return to the computer to unlock it, sound gets enabled. So, the
screensaver not only locks my computer (preventing anyone from walking
up to it to use it without my permissions) but also results in quieting
my computer while it is locked.

Lots of ways to run scheduled events to shutdown the computer using the
shutdown.exe program and run other programs using Task Scheduler.

Since you are unlikely to have an old AT-style motherboard, the ATX mobo
will still have power even if you use the Power switch for 4 seconds.
ATX switched to a soft-mode power function using logic on the mobo
(instead of a switch directly to the PSU). When powered off but the
power cord still connected to a live outlet, +5VSB (standby) is still
supplied to the mobo from the PSU to power the power-on hardware logic
on the mobo. The only way to remove all power to the mobo is to yank
the power cord, or a power strip it is connected to, or to a timer in
the outlet; however, that completely removes power from the computer
even if the OS is still running and apps still loaded. You can follow
nospam's advice if you're willing to suffer the consequences of a
non-graceful shutdown that can cause corruption of inuse files still
open for writing.

There is a problem when defining events using the Task Scheduler GUI.
It doesn't know how to handle the login credentials for a Microsoft
account, only for locally defined (aka offline) Windows accounts. Since
you need to run the event under elevated privileges (so it can run
shutdown.exe), Task Scheduler will ask for the login credentials for the
account under which the event runs. If you're using a Microsoft
account, Task Scheduler will reject those login credentials. The
result, with a Microsoft account, is you can run scheduled events with
elevated privileges only when "Run only when user is logged on" option
is selected.

You could run the event under the Administrator account (provided you
know its login credentials) or other offline Windows account for which
you know its login credentials, or under the System account (provided
your Windows account under which you define the event is in the
Administrators security group). Alternatively you can use the
command-mode schtasks.exe program to define events, and it doesn't have
the login credentials problem with Microsoft accounts for the Task
Scheduler GUI interface. Rather than provide here a tutorial on how use
schtasks.exe, I'll let you research on the Internet.