Automatic shutdown after scheduled backup has been completed

Hi


I was looking for a solution to shut down my PC when AOMEI Backupper has finished the backup task.


My NAS starts the PC at midnight by Wake-On-LAN. After startup the
backup runs but i don't like the PC running for the whole night when backup has been finished.


According this instruction Automatic Shutdown after Windows 7 Backup an automatic shutdown is only possible when you start the backup task manually but it is not possible when backup task starts automatically on schedule or event.


Here is my workaround: I created a VB-Script like this:


If Hour(Now) <> 0 Then WScript.Quit

Dim objWMIService, objItems, oShell, strComputer
strComputer = "."
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Do
    WScript.Sleep(5 * 1000 * 60)
    Set objItems = objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'ABCore.exe'")
    If objItems.Count = 0 Then
        ' Program ABCore.exe does not run, shutdown the computer
        Set oShell = CreateObject("WScript.Shell")
        oShell.Run oShell.ExpandEnvironmentStrings("%SystemRoot%") & "\system32\shutdown.exe /s /t 60 /c ""Computer will shutdown in 60 Seconds. Enter 'shutdown.exe /a' in command-line to cancel it."""
        Set oShell = Nothing
        WScript.Quit
    End If
Loop



The program is started by Windows "Task Scheduler" at startup. First line is important, if the current time is not between 00:00:00 and 00:59:59 the script quits, otherwise it would shutdown th computer everytime the user start it.

The sctips checks every 5 Minutes if AOMEI backup process 'ABCore.exe' is running. If the process does not exist (i.e. backup has been finished) a shutdown is triggered.


I know this solution is for more advanced computer users, but it provides a solution for a function which is not available by default in AOMEI Backupper. Perhaps such feature will be added in future release.


Best Regards

Wernfried












Comments

  • We will consider this feature, thanks for your suggestion.

Sign In or Register to comment.