locked
Close window after running batch file? RRS feed

  • Question

  • Greetings all!

    I'm successfully running SyncToy via a shortcut in my Startup programs folder that runs the line "C:\Program Files\SyncToy 2.0\SyncToyCmd.exe" -R

    Only problem is, after it runs, the window stays open.  I figured out how to make it stay minimized, but does anyone know if there's a way to make it close upon completion?

    Thanks!
    Saturday, January 17, 2009 1:51 AM

Answers

  •  Ann Tang [MSFT] wrote:

     I think this should work.

     

    start C:\"Program Files\SyncToy 2.0\SyncToy.exe" -R

    exit

     



    Ahhh, when I substituted "SyncToyCmd.exe", it worked!

    Thanks!
    Friday, January 23, 2009 11:44 PM

All replies

  • you could write a batch file and execute it (save the following to something like "runsynctoy.cmd" and then execute it:

     

    start C:\Program Files\SyncToy 2.0\SyncToyCmd.exe" -R
    exit

     

     

    Monday, January 19, 2009 9:31 PM
  • Hmmmmm I'll try that when I get home, thanks!
    Tuesday, January 20, 2009 2:28 AM
  • Well, I tried that just now, and I get an error message that says "Windows cannot find 'CIndifferentProgram'. Make sure you typed the name correctly, and then try again."

    I've tried it both with and without quotes, as the shortcut has...
    Tuesday, January 20, 2009 7:01 PM
  • I use the following in a .bat file

     

    "C:\Program Files\SyncToy 2.0\SyncToyCmd.exe" -R

    ...this runs on the desktop under vista...works like a charm.  Are you sure you have the space after the quote and before the -R ?

     

    MC

    Friday, January 23, 2009 10:09 PM
  •  I think this should work.

     

    start C:\"Program Files\SyncToy 2.0\SyncToy.exe" -R

    exit

     

    Friday, January 23, 2009 10:35 PM
  •  MC Carm wrote:

    I use the following in a .bat file

     

    "C:\Program Files\SyncToy 2.0\SyncToyCmd.exe" -R

    ...this runs on the desktop under vista...works like a charm.  Are you sure you have the space after the quote and before the -R ?

     

    MC



    Well, I just tried that, and it tells me "Windows cannot find '-R'.  Make sure you typed the name correctly, and then try again"
    Friday, January 23, 2009 11:40 PM
  •  Ann Tang [MSFT] wrote:

     I think this should work.

     

    start C:\"Program Files\SyncToy 2.0\SyncToy.exe" -R

    exit

     



    Ahhh, when I substituted "SyncToyCmd.exe", it worked!

    Thanks!
    Friday, January 23, 2009 11:44 PM
  • hi! I have the same issue under Windows 10. how can I close the synctoycmd-window automatically after all jobs are done?

    none of the written solutions are working under windows 10.

    thanks and best regards!

    Friday, December 27, 2019 10:06 AM