+ Post New Thread
Results 1 to 4 of 4
Windows 7 Thread, Task Schedular Trigger in Technical; I am running MS SyncToy to sync some personal files from my laptop with an external hard drive. I am ...
  1. #1
    leon032's Avatar
    Join Date
    Feb 2009
    Location
    Miami
    Posts
    43
    Thank Post
    7
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Task Schedular Trigger

    I am running MS SyncToy to sync some personal files from my laptop with an external hard drive. I am using Windows 7 and have used the task scheduler to automate it. What I want it to do is to run upon a certain event. When My Passport is plugged into the usb port I want the task to run. Can a trigger be set on the laptop so it knows the hard drive is plugged in? I am not sure where these event is logged so it can trigger the task. Your suggestion is greatly appreciated.

  2. #2

    AngryTechnician's Avatar
    Join Date
    Oct 2008
    Posts
    3,730
    Thank Post
    698
    Thanked 1,212 Times in 761 Posts
    Rep Power
    395
    This isn't supported natively, but if you could do it using USBDLM. Have a good read through the online help section on AutoRuns.

  3. #3


    Join Date
    Feb 2007
    Location
    51.403651, -0.515458
    Posts
    9,065
    Thank Post
    232
    Thanked 2,717 Times in 2,005 Posts
    Rep Power
    795
    Quote Originally Posted by AngryTechnician View Post
    This isn't supported natively
    It is supported natively, otherwise you wouldn't be able to do this...

    PortableApps, SyncToy and Windows Task Scheduler

    ... or this (using Win32_VolumeChangeEvent)...

    Monitoring Volume Change Events in PowerShell using WMI / http://superuser.com/a/93751



    You could even bypass Task Scheduler altogether and register WMI events that trigger when a USB HDD/flash drive is inserted. For more info on this, Google 'Register-WmiEvent' (PS 2.0) or 'Register-CimIndicationEvent' (PS 3.0).

  4. #4

    AngryTechnician's Avatar
    Join Date
    Oct 2008
    Posts
    3,730
    Thank Post
    698
    Thanked 1,212 Times in 761 Posts
    Rep Power
    395
    I stand corrected. However, the first example (using event log triggers) doesn't allow you to specify an event for a particular USB device (at least not without some serious XPath-fu that isn't in the UI). The example they give will trigger when any USB mass storage device is connected, which is undesirable in most use cases.

    The second link looks more promising if the WMI query was expanded to check for a particular device ID, though in my book it's arguable whether something is 'native' to Windows if you have to write your own code...
    Last edited by AngryTechnician; 2nd April 2013 at 02:29 PM.

SHARE:
+ Post New Thread

Similar Threads

  1. Task schedular 2
    By cookie_monster in forum Windows Server 2008
    Replies: 0
    Last Post: 23rd November 2009, 10:47 AM
  2. Task-IT / EduGeek /ICT Register workshop 30th March 2006
    By GrumbleDook in forum Courses and Training
    Replies: 12
    Last Post: 5th April 2006, 10:09 PM
  3. got some places one task it course
    By russdev in forum General EduGeek News/Announcements
    Replies: 7
    Last Post: 24th March 2006, 09:19 AM
  4. Task timeframes.
    By Jake in forum How do you do....it?
    Replies: 8
    Last Post: 6th January 2006, 12:16 PM
  5. Replies: 9
    Last Post: 8th November 2005, 09:45 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •