Skip to main content

Notification when backup is complete -- on the Desktop

My wife often forgets to disconnect the external USB (Slim) drive when her weekly backup is complete. So she needs a reminder.

I thought of a post command, but Tech Support. said that

echo Disconnect Slim now

would only show in the Activity tab of ATI. This would not be helpful.

So I wrote a one-line AutoIt script, F:\AutoIt scripts\TrueImageBackupIsFinished.au3:

MsgBox(0,'','Backup is finished, so please disconnect Slim drive')

I tested this at a Windows command prompt. It ran OK

I then entered it in Pre-command as

"F:\AutoIt scripts\TrueImageBackupIsFinished.au3"

leaving Working directory blank.

I tested it in ATI. That opened the script in SCITe, the script editor, despite the association being set to Run.

I compiled the .au3 to a .exe. The .exe ran at a command prompt AOK.

But when I entered it (with quotes) in ATI, ATI told me error.

Suggestions?

0 Users found this helpful

Hi Chris, I've not had much luck with getting messages displayed by ATI via Pre or Post Command scripts.

Perhaps an alternative approach here would be to dismount the external USB drive so that it no longer has a drive letter allocated and cannot be exploited by malware etc

See USB_Mount_Remove.zip in the MVP User Tools and Tutorials repository which I updated to use PowerShell recently.

Chris, just played around a little further with Powershell and have got a message box to display for a test backup task, though it is somewhat 'ugly' because I cannot find a way to get Powershell to launch without showing a background black command window as in the screen shot below!

To get the above message box needed 3 scripts in total!

PS_Invoke.CMD (used in the Post Command for the ATI Task)

powershell.exe -ExecutionPolicy ByPass -File E:\Powershell\MessageBox\PS_Invoke.ps1

PS_Invoke.PS1 (used to launch the actual PS script that produces the message box)

Invoke-Expression -Command "E:\Powershell\MessageBox\PS_Message.ps1"

PS_Message.PS1

Add-Type -AssemblyName PresentationCore,PresentationFramework

$ButtonType = [System.Windows.MessageBoxButton]::OK
$MessageboxTitle = "Backup task has ended!"
$Messageboxbody = "Please disconnect the external USB backup drive"
$MessageIcon = [System.Windows.MessageBoxImage]::Exclamation
[System.Windows.MessageBox]::Show($Messageboxbody,$MessageboxTitle,$ButtonType,$messageicon)

Finally, how it looks for the Post Command.

Obviously you would need to adjust the path to these scripts to suit your system.

This may give you some ideas that you could use to adapt your AutoIt solution?

Steve,

Thank you. I will try your solution.

I now think I understand why my AutoIt approach failed: a Post Command cannot be interactive. MsgBox() requires a response from the user (clicking on OK).

Somehow using PowerShell overcomes this limitation of ATI.