0

Under Windows 10, would it be possible to display a pop-up and pause a sync service when a specific usb drive is not found?

Best regards,

Gilles

  • 1
    I grabbed this, would you use it? Get-Volume -UniqueId ??> (https://docs.microsoft.com/en-us/powershell/module/storage/get-volume?view=win10-ps) – brokengillou Oct 16 '18 at 17:35

1 Answers1

0

If you refer to a system service, it's the service itself that should register for the event. The only other way to do that is to have a script pause and start the service when the USB device is introduced/dismounted. The same approach is to be used to start some sync job that is not a system service.

Here is where it starts getting technical : The tool to use is PowerShell, and you should write a script that starts the sync when the drive is introduced.

You may find such a script in the post Starting scheduled task by detecting connection of USB device, which you may adapt to your purpose. That script starts a batch job when the specified drive is introduced. You may start the script at user logon with the Task Scheduler.

harrymc
  • 455,459
  • 31
  • 526
  • 924