locked
Turning off Synctoy notification screen RRS feed

  • Question

  • I have scheduled Synctoy to run every 30 minutes using Task Scheduler. I am using the SyncToyCmd.exe with the -R parameter set. Under General Settings in Task Manager I have checked the "Hidden" box. It all works very well with the exception that every 30 minutes I get a "DOS-type" window popping up that shows me the status of the synctoy run. It has the notation "taskeng.exe" in the upper left-hand corner of the window. Having checked off hidden, I don't really see why this window is popping up. Is there any way to prevent this? Many thanks.

     

    WT

    Wednesday, April 21, 2010 6:54 AM

Answers

All replies

  • Hi WT,

    I was having the same issue.  I ended up writing a VBS that hides the command window, and calling that VBS from the command line in the SyncToyCmd scheduled task:

    Command line in the scheduled task: "C:\Program Files\SyncToy 2.1\scheduledBackup.vbs"

    Contents of "scheduledBackup.vbs":

    const HIDDEN_WINDOW = 12
    
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
     & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set objStartup = objWMIService.Get("Win32_ProcessStartup")
    
    Set objConfig = objStartup.SpawnInstance_
    objConfig.ShowWindow = HIDDEN_WINDOW
    Set objProcess = GetObject("winmgmts:root\cimv2:Win32_Process")
    errReturn = objProcess.Create("C:\Program Files\SyncToy 2.1\SyncToyCmd.exe -R", null, objConfig, intProcessID)
    

    Works like a charm so far.

    Sources:

    http://www.geekstogo.com/forum/Hide-command-prompt-windows-t56092.html

    http://msdn.microsoft.com/en-us/library/aa394375%28v=VS.85%29.aspx

    http://gallery.technet.microsoft.com/ScriptCenter/en-us/8bbed56f-a7aa-491f-a296-687dd96098a3

    Wednesday, April 21, 2010 6:34 PM
  • I'm quite new to programming, sorry for being a newbie...  :)
    Can you point me where you name your sync folders in the .vbs script?  

    is it the following line?
    "\root\cimv2"

    For example, if my sync folder name is     "P429" where whould I put it in the script?

    BTW you rock!

    Friday, April 30, 2010 8:02 PM