Hi All,
I want to start the Synchronisation of the microsoft Synchronisation Center via de command line (so via a batch file)
Via 'control /name Microsoft.SyncCenter' the synch centrer opens, but then I still need to click on the 'Sync All' button (or click that option after right clicking the Sync icon in the taskbar)
I want to start 'sync all' via de command line but haven't found which switch or option to use after 'control /name Microsoft.SyncCenter' to start synchronisation directly.
Does anyone know if this is possible at all, and if so where to find the switches (or in that case just let me know the command line I need)?
Thanks in advance.
Rog
How to start sync (Microsoft.SyncCenter) via command line
Moderator: DosItHelp
Re: How to start sync (Microsoft.SyncCenter) via command lin
Is there anything useful here? I didn't look closely.
http://blogs.technet.com/b/filecab/arch ... -line.aspx
http://blogs.technet.com/b/filecab/arch ... -line.aspx
Re: How to start sync (Microsoft.SyncCenter) via command lin
Thanks, but I've seen that before, and it's not what I meant (I guess).
A whole lot of parameters are given in that .vbs checking a lot of everything, indicating locations and sync directions etc.
In my case the settings of the Sync Center are already good (set via the Windows Sync Centre GUI).
I only want to give the command to start via the command line . . if possible.
A whole lot of parameters are given in that .vbs checking a lot of everything, indicating locations and sync directions etc.
In my case the settings of the Sync Center are already good (set via the Windows Sync Centre GUI).
I only want to give the command to start via the command line . . if possible.
-
- Expert
- Posts: 1167
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: How to start sync (Microsoft.SyncCenter) via command lin
You can delete the parts you don't need...
Also, no, Sync Center doesn't take command line arguments and batch files can't interact with GUIs.
Also, no, Sync Center doesn't take command line arguments and batch files can't interact with GUIs.
Re: How to start sync (Microsoft.SyncCenter) via command lin
What you can do is use SENDKEYS in a batch script to press the TAB key the right number of times and then press the ENTER key to launch the task.
It depends heavily on the format of the screen always being laid out the same way.
It depends heavily on the format of the screen always being laid out the same way.
-
- Expert
- Posts: 1167
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: How to start sync (Microsoft.SyncCenter) via command lin
It also depends on SendKeys being in a good mood. I've found it to be extremely finicky, especially on faster PCs. Powershell might be able to pull something like that off, but I still think the best option is the take the vbs script that already exists and modify it to suit your needs.
Re: How to start sync (Microsoft.SyncCenter) via command lin
ShadowThief wrote:It also depends on SendKeys being in a good mood. I've found it to be extremely finicky, especially on faster PCs.
Do you think the finicky-ness is largely the need for screen focus to be absolutely static?
If a script is scheduled or called from something else - and the mouse or keyboard is being used at the time - then all hell can break loose when unintended keys and buttons are clicked and pressed.
I didn't look at the VBS script but I did note the comment on the page saying it can be stripped down too.
-
- Expert
- Posts: 1167
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: How to start sync (Microsoft.SyncCenter) via command lin
foxidrive wrote:ShadowThief wrote:It also depends on SendKeys being in a good mood. I've found it to be extremely finicky, especially on faster PCs.
Do you think the finicky-ness is largely the need for screen focus to be absolutely static?
That's definitely a part of it.
The one time I've used SendKeys, I had to move and resize some windows to specific locations on the screen and I had to use this nasty hack where I would send ALT+SPACE and then M and simulated arrow keys to move a window, but it only worked properly when num lock was off because SendKeys uses the numpad arrows, so if numlock was on, SendKeys would turn off numlock, hit the button, and turn numlock back on. If I didn't throw in a slight delay, a lot of button presses would get missed in the rapid-fire key sending. But sometimes keys would get missed even under optimal conditions, so I don't know what was going on there. Eventually I ended up using PowerShell because it can use the Win32 API and so moving and resizing windows was a built in feature.
That was a lot of words...