Register    Login    Search    Articles & downloads     Who We Are    Donate    Jaylach Free Sites

Board index » Technical Forums » Programs (Applications)




Post new topic Reply to topic  [ 79 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post Posted: Sun Dec 17, 2017 11:34 am 
Offline
welcoming committee
User avatar

Joined: Fri Nov 30, 2012 12:47 am
Posts: 2406
Location: North Central Arkansas
I have been using Task Scheduler to automate my SyncToy backups on a weekly basis. Everything was working fine up until 11/16/17. Now Task Scheduler fails with a 'Last Run Result of (0x2). One recommended solution I found on the internet was to open the SyncToy task properties and ensure that I was running the task with 'highest privileges', which I was already doing.

I'm thinking that perhaps a Win 10 update might be the cause of my sudden problem. I am currently running Fall Creators Update version 1709.

I would appreciate any suggestions/advice on how to get Task Scheduler to once again run SyncToy in automated mode. Thanks in advance....

_________________
BB
http://barrypatch.net


Top 
 Profile  
Reply with quote  
 Post Posted: Sun Dec 17, 2017 12:17 pm 
Offline
Site Admin
User avatar

Joined: Tue Apr 10, 2012 9:48 pm
Posts: 2954
Location: New Jersey
The code means -- The system cannot find the file specified.
What do you have set up for the task details?
The error suggests that the path to the program may not be properly specified.
Can you execute the task manually from task scheduler?
-steve

_________________
stephen boots
Microsoft MVP 2004 - 2020
"Life's always an adventure with computers!"


Top 
 Profile  
Reply with quote  
 Post Posted: Sun Dec 17, 2017 12:30 pm 
Offline
welcoming committee
User avatar

Joined: Fri Nov 30, 2012 12:47 am
Posts: 2406
Location: North Central Arkansas
Steve, thanks for your reply. I've got to leave the house for awhile but will try and answer your questions when I return. To my knowledge, I have not made any changes to the task since it last ran successfully on 11/16. But my system sometimes has a mind of its own, so you never know, lol.

_________________
BB
http://barrypatch.net


Top 
 Profile  
Reply with quote  
 Post Posted: Sun Dec 17, 2017 12:52 pm 
Offline
Resident Geekazoid Administrator
User avatar

Joined: Wed Mar 21, 2012 5:09 am
Posts: 9455
Location: The state of confusion; I just use Wyoming for mail.
Looks like Steve beat me to the post. ;) I'm still going to leave mine as is but take any advice from Steve before mine.

First try running the task manually to see if it works. If not remove the task and set up again.

Second go to the executable for SyncToy, right click and go to Properties. Under the Compatibility tab select to run as admin.

If no success go on to the following.

This is actually an access denied error. The solution you stated is supposed to cure but obviously did not in your case so let's try something else...

Go to http://jaylach.com/downloads and grab the file 'Take Ownership'. Unzip and execute the registry hack to enable Take Ownership in your right click context menu. Right click on all folders that you are syncing and select to Take Ownership. A command prompt will open that automates permission settings, just let it run. Depending on how many files/folders are involved it can take a little time.

If you go through Event Viewer you MAY find the file/folder that is causing the issue.

You can also check the SyncToy logs. You can view the SyncToy log by opening SyncToy, and click on File->View log. Don't quote me on the path as I don't have SyncToy installed. I use GoodSync instead. It is not free but well worth the cost.
https://www.goodsync.com/
You can set the sync to go both directions or just one like a clone. The clone is what I use so my second system data is exactly the same as my main.

_________________
Image
Free sites from jaylach.com
I NEVER forget... I just remember late.


Top 
 Profile  
Reply with quote  
 Post Posted: Sun Dec 17, 2017 4:01 pm 
Offline
welcoming committee
User avatar

Joined: Fri Nov 30, 2012 12:47 am
Posts: 2406
Location: North Central Arkansas
sboots wrote:
The code means -- The system cannot find the file specified.
What do you have set up for the task details?
Per the instructs specified in SyncToy Help for scheduling, here is the program action detail:
"C:\\Program Files (86)\SyncToy 2.1\SyncToyCmd.exe -R"
And the trigger detail is:
At 6:30am every Sunday of every week starting 3/9/16

The error suggests that the path to the program may not be properly specified.
Can you execute the task manually from task scheduler?
No, at least not by highlighting the task and clicking on Run

But here is something odd that I don't fully understand. If I go to the SyncToy folder, there are two executable files:
SyncToyCmd.exe (this file doesn't do anything when I click on it)
SyncToy.exe (this file will run SyncToy when I click on it)

But I still can't run SyncToy from Task Scheduler....still get the (0x2) code. I've done more as discussed below in my response to Jay.

-steve

_________________
BB
http://barrypatch.net


Top 
 Profile  
Reply with quote  
 Post Posted: Sun Dec 17, 2017 4:21 pm 
Offline
Resident Geekazoid Administrator
User avatar

Joined: Wed Mar 21, 2012 5:09 am
Posts: 9455
Location: The state of confusion; I just use Wyoming for mail.
I don't see a response...

_________________
Image
Free sites from jaylach.com
I NEVER forget... I just remember late.


Top 
 Profile  
Reply with quote  
 Post Posted: Sun Dec 17, 2017 4:27 pm 
Offline
welcoming committee
User avatar

Joined: Fri Nov 30, 2012 12:47 am
Posts: 2406
Location: North Central Arkansas
jaylach wrote:
Looks like Steve beat me to the post. ;) I'm still going to leave mine as is but take any advice from Steve before mine.
My response to Steve is shown above

First try running the task manually to see if it works. If not remove the task and set up again.
I can run SyncToy manually from the SyncToy folder, but not from within Task Scheduler. I have not yet removed the task and set it up again (I just now noticed that recommendation...sorry).
Second go to the executable for SyncToy, right click and go to Properties. Under the Compatibility tab select to run as admin.
As I told Steve, when I go to the SyncToy folder, there are two executables:
SyncToyCmd.exe (this file doesn't do anything when I click on it)
SyncToy.exe (this file will run SyncToy when I click on it)
If no success go on to the following.

This is actually an access denied error. The solution you stated is supposed to cure but obviously did not in your case so let's try something else...

Go to http://jaylach.com/downloads and grab the file 'Take Ownership'. Unzip and execute the registry hack to enable Take Ownership in your right click context menu. Right click on all folders that you are syncing and select to Take Ownership. A command prompt will open that automates permission settings, just let it run. Depending on how many files/folders are involved it can take a little time.
I did all the above without any difficulty; and yes, it did take awhile because of all the folders/files I had.
If you go through Event Viewer you MAY find the file/folder that is causing the issue.
I looked at the Event Viewer, but there is just too much stuff there for me to understand.
You can also check the SyncToy logs. You can view the SyncToy log by opening SyncToy, and click on File->View log.
I did look at these logs and there was nothing about a run using Task Scheduler. I did perform a manual SyncToy run earlier this morning, so there were some log notes pertaining to a couple of files they could not read from the Recycle Bin.

Don't quote me on the path as I don't have SyncToy installed. I use GoodSync instead. It is not free but well worth the cost.
https://www.goodsync.com/
I know you and Steve like this program, but the free SyncToy has served me well. It still works fine when I run it manually....I just can no longer get it to execute using Task Scheduler.

Unless you and/or Steve can tell me something else to try, I probably need to remove and reinstall the SyncToy task under Task Scheduler. That's what you meant, right? I shouldn't need to reinstall SyncToy since it works great manually.
You can set the sync to go both directions or just one like a clone. The clone is what I use so my second system data is exactly the same as my main.

_________________
BB
http://barrypatch.net


Last edited by bbarry on Sun Dec 17, 2017 4:30 pm, edited 1 time in total.

Top 
 Profile  
Reply with quote  
 Post Posted: Sun Dec 17, 2017 4:28 pm 
Offline
welcoming committee
User avatar

Joined: Fri Nov 30, 2012 12:47 am
Posts: 2406
Location: North Central Arkansas
jaylach wrote:
I don't see a response...

I just posted it.....took me awhile to compose, lol.

_________________
BB
http://barrypatch.net


Top 
 Profile  
Reply with quote  
 Post Posted: Sun Dec 17, 2017 4:55 pm 
Offline
Resident Geekazoid Administrator
User avatar

Joined: Wed Mar 21, 2012 5:09 am
Posts: 9455
Location: The state of confusion; I just use Wyoming for mail.
If you want to try running the executable as admin do both. SyncToy.exe is, as you know, what is used to get the interface on the screen. SyncToyCmd.exe, I believe, is what actually does the sync.

Steve and I did not mean if you could run SyncToy manually but if you could manually run the sync from within SyncToy not using Task Scheduler.

_________________
Image
Free sites from jaylach.com
I NEVER forget... I just remember late.


Top 
 Profile  
Reply with quote  
 Post Posted: Sun Dec 17, 2017 5:07 pm 
Offline
welcoming committee
User avatar

Joined: Fri Nov 30, 2012 12:47 am
Posts: 2406
Location: North Central Arkansas
jaylach wrote:
If you want to try running the executable as admin do both. SyncToy.exe is, as you know, what is used to get the interface on the screen. SyncToyCmd.exe, I believe, is what actually does the sync.

Steve and I did not mean if you could run SyncToy manually but if you could manually run the sync from within SyncToy not using Task Scheduler.

Jay, here's where I get confused because I don't know what you mean by "manually run the sync from within SyncToy". I have 6 folder pair that I want to backup to an external drive. If I open SyncToy, click on all 6 folder pair, and then click on Run.......everything works just fine. But when I try to automate this very process using Task Scheduler....that's when I get the (0x2) code.

_________________
BB
http://barrypatch.net


Top 
 Profile  
Reply with quote  
 Post Posted: Sun Dec 17, 2017 5:14 pm 
Offline
Resident Geekazoid Administrator
User avatar

Joined: Wed Mar 21, 2012 5:09 am
Posts: 9455
Location: The state of confusion; I just use Wyoming for mail.
What you did, running the sync, is what was wanted. Just needed to confirm that the sync was still set properly.

Let's see what Steve says. Personally I'm surprised that you got SyncToy to work through Task Scheduler in the first place. I never did although I didn't try real hard.

_________________
Image
Free sites from jaylach.com
I NEVER forget... I just remember late.


Top 
 Profile  
Reply with quote  
 Post Posted: Sun Dec 17, 2017 5:19 pm 
Offline
welcoming committee
User avatar

Joined: Fri Nov 30, 2012 12:47 am
Posts: 2406
Location: North Central Arkansas
jaylach wrote:
What you did, running the sync, is what was wanted. Just needed to confirm that the sync was still set properly.

Let's see what Steve says. Personally I'm surprised that you got SyncToy to work through Task Scheduler in the first place. I never did although I didn't try real hard.

Thanks Jay. I'm going to take a break, wait and see what Steve says, and then maybe remove the task and set it up again under Task Scheduler. If that doesn't work, maybe I will try/purchase GoodSync.

_________________
BB
http://barrypatch.net


Top 
 Profile  
Reply with quote  
 Post Posted: Sun Dec 17, 2017 5:40 pm 
Offline
Resident Geekazoid Administrator
User avatar

Joined: Wed Mar 21, 2012 5:09 am
Posts: 9455
Location: The state of confusion; I just use Wyoming for mail.
If you do end up buying GoodSync just get one license not one for each machine. One license is good for all involved machines.

_________________
Image
Free sites from jaylach.com
I NEVER forget... I just remember late.


Top 
 Profile  
Reply with quote  
 Post Posted: Sun Dec 17, 2017 9:37 pm 
Offline
Site Admin
User avatar

Joined: Tue Apr 10, 2012 9:48 pm
Posts: 2954
Location: New Jersey
I presume that this is a typo: "C:\\Program Files (86)\SyncToy 2.1\SyncToyCmd.exe -R"

There should only be one backslash...

However, I'd be setting the task up like this (after verifying that path to the exe):
Attachment:
Capture.JPG
Capture.JPG [ 44.52 KiB | Viewed 15598 times ]


-steve

_________________
stephen boots
Microsoft MVP 2004 - 2020
"Life's always an adventure with computers!"


Top 
 Profile  
Reply with quote  
 Post Posted: Sun Dec 17, 2017 10:05 pm 
Offline
welcoming committee
User avatar

Joined: Fri Nov 30, 2012 12:47 am
Posts: 2406
Location: North Central Arkansas
@ Steve - Yes that was a typo with the double backslash...sorry about that.

I removed my SyncToy task from Task Scheduler and set it up again. As you suggested, this time I put the -R argument where it said add arguments, rather than appending it directly to the script. Either way, it always ends up appended.

The Task Scheduler still didn't work, but I guess I'm making progress. This time I received a (0x1) error code, whatever that means.

I'm about ready to toss SyncToy and go with GoodSync....too much time wasted today on this issue.

But thanks to you and Jay for your help,

_________________
BB
http://barrypatch.net


Top 
 Profile  
Reply with quote  
 Post Posted: Sun Dec 17, 2017 10:12 pm 
Offline
Site Admin
User avatar

Joined: Tue Apr 10, 2012 9:48 pm
Posts: 2954
Location: New Jersey
I *love* GoodSync, by the way. :-) I have been using it for years and abandoned SyncToy long ago. It is well worth buying -- I've purchased multiple licenses for it.

That said, although this is about a Windows Server scheduled task, it might apply here:
https://myousufali.wordpress.com/2012/0 ... error-0x1/

And:
Make sure Task Scheduler service and its dependent services are running. Task Scheduler service depends on Remote Procedure Call (RPC), DCOM Server Process Launcher and RPC Endpoint Mapper services.

-steve

_________________
stephen boots
Microsoft MVP 2004 - 2020
"Life's always an adventure with computers!"


Top 
 Profile  
Reply with quote  
 Post Posted: Mon Dec 18, 2017 9:41 pm 
Offline
welcoming committee
User avatar

Joined: Fri Nov 30, 2012 12:47 am
Posts: 2406
Location: North Central Arkansas
@ Steve & Jay -
I just hate to admit defeat when I encounter some of Microsoft's esoteric processes and tools. So I kept plugging away at SyncToy and finally got it to work with Task Scheduler. :rofl2:

I normally run Task Scheduler-SyncToy unattended, but I decided this time to observe the execution of SyncToyCmd.exe. Unfortunately, it moved pretty fast and cleared the screen before I had time to study the results. So I wrote a small batch file with a "pause" at the end so I could see what went on when Task Scheduler was working.

Specifically, here is my STBatch.bat file:
@echo off
"C:\Program Files (x86)\SyncToy 2.1\SyncToyCmd.exe" -R
pause

And here is my resulting Task Scheduler script:
C:\Users\BB\Documents\STBatch.bat

This task ran great (several times), and all my new & modified files were successfully backed-up to my external drive. After I observe a few more successful runs, I will remove the "pause" command from my batch file so that the process can be totally unattended.

Thanks again for all your help. And BTW, I am still going to purchase/use GoodSync, as I still don't totally trust SyncToy. Plus, I have been using RoboForm for years and really like that program.

_________________
BB
http://barrypatch.net


Top 
 Profile  
Reply with quote  
 Post Posted: Mon Dec 18, 2017 10:00 pm 
Offline
Resident Geekazoid Administrator
User avatar

Joined: Wed Mar 21, 2012 5:09 am
Posts: 9455
Location: The state of confusion; I just use Wyoming for mail.
BB wrote:
Specifically, here is my STBatch.bat file:
@echo off
"C:\Program Files (x86)\SyncToy 2.1\SyncToyCmd.exe" -R
pause

And here is my resulting Task Scheduler script:
C:\Users\BB\Documents\STBatch.bat

Eloquent solution! Job well done. :urock:

Since your .bat file opens the Windows Command Prompt it MAY be that your Command Prompt has higher access levels.

If you are serious about buying GoodSync I don't know that I would use the same destination for both GoodSync and SyncToy. Steve may have better insight but I'd be worried that the two being used MIGHT cause a conflict.

_________________
Image
Free sites from jaylach.com
I NEVER forget... I just remember late.


Top 
 Profile  
Reply with quote  
 Post Posted: Mon Dec 18, 2017 11:09 pm 
Offline
welcoming committee
User avatar

Joined: Fri Nov 30, 2012 12:47 am
Posts: 2406
Location: North Central Arkansas
Thanks, Jay. I wasn't quite sure why my .bat file approach worked and the other didn't, but I was thinking it had something to do with 'higher access', which I kept reading about.

So you are suggesting I use a different external drive for GoodSync than I am currently using for SyncToy? Once I get the hang of using GoodSync, I will probably do away with SyncToy.....I've spent hours on that program that I will never get back.

_________________
BB
http://barrypatch.net


Top 
 Profile  
Reply with quote  
 Post Posted: Mon Dec 18, 2017 11:12 pm 
Offline
Site Admin
User avatar

Joined: Tue Apr 10, 2012 9:48 pm
Posts: 2954
Location: New Jersey
There should be no issue with setting the same folder pairs in SyncToy and GoodSync, but I'd exclude (from each other) the files used by both programs to track changes and save copies of deleted files (assuming you have the option set in GoodSync). I would simply prevent them from running at the same time to avoid conflicts.
-steve

_________________
stephen boots
Microsoft MVP 2004 - 2020
"Life's always an adventure with computers!"


Top 
 Profile  
Reply with quote  
 Post Posted: Mon Dec 18, 2017 11:17 pm 
Offline
welcoming committee
User avatar

Joined: Fri Nov 30, 2012 12:47 am
Posts: 2406
Location: North Central Arkansas
sboots wrote:
but I'd exclude (from each other) the files used by both programs to track changes and save copies of deleted files (assuming you have the option set in GoodSync).
Steve, I guess I'm dense, but I have no idea what you are telling me here. Maybe it's because I haven't ever used GoodSync.
-steve

_________________
BB
http://barrypatch.net


Top 
 Profile  
Reply with quote  
 Post Posted: Mon Dec 18, 2017 11:29 pm 
Offline
Resident Geekazoid Administrator
User avatar

Joined: Wed Mar 21, 2012 5:09 am
Posts: 9455
Location: The state of confusion; I just use Wyoming for mail.
Each program has to keep a sort of data base of what has been done so it is known what is what in relation to the last time ran. If such files are not protected from the other program it can cause problems. Not nearly as drastic but sort of like running two anti-virus programs at the same time.

_________________
Image
Free sites from jaylach.com
I NEVER forget... I just remember late.


Top 
 Profile  
Reply with quote  
 Post Posted: Mon Dec 18, 2017 11:33 pm 
Offline
welcoming committee
User avatar

Joined: Fri Nov 30, 2012 12:47 am
Posts: 2406
Location: North Central Arkansas
jaylach wrote:
Each program has to keep a sort of data base of what has been done so it is known what is what in relation to the last time ran. If such files are not protected from the other program it can cause problems. Not nearly as drastic but sort of like running two anti-virus programs at the same time.

So how do I know what and where these data base files are? How do I provide this protection?

_________________
BB
http://barrypatch.net


Top 
 Profile  
Reply with quote  
 Post Posted: Mon Dec 18, 2017 11:41 pm 
Offline
Resident Geekazoid Administrator
User avatar

Joined: Wed Mar 21, 2012 5:09 am
Posts: 9455
Location: The state of confusion; I just use Wyoming for mail.
bbarry wrote:
jaylach wrote:
Each program has to keep a sort of data base of what has been done so it is known what is what in relation to the last time ran. If such files are not protected from the other program it can cause problems. Not nearly as drastic but sort of like running two anti-virus programs at the same time.

So how do I know what and where these data base files are? How do I provide this protection?

Sorry but I have no idea, mayhaps Steve knows. You have to remember that I don't even have SyncToy installed.

This is why I suggested not having the same destination as that would reduce the risk of conflicts.

Here is what I would do... Install the trial for GoodSync and keep SyncToy. Set up different destinations and play. When you decide which you prefer get rid of the other. If Steve gives different advice please go with what he advises.

_________________
Image
Free sites from jaylach.com
I NEVER forget... I just remember late.


Top 
 Profile  
Reply with quote  
 Post Posted: Tue Dec 19, 2017 8:29 am 
Offline
Site Admin
User avatar

Joined: Tue Apr 10, 2012 9:48 pm
Posts: 2954
Location: New Jersey
bbarry wrote:
jaylach wrote:
Each program has to keep a sort of data base of what has been done so it is known what is what in relation to the last time ran. If such files are not protected from the other program it can cause problems. Not nearly as drastic but sort of like running two anti-virus programs at the same time.

So how do I know what and where these data base files are? How do I provide this protection?


Synctoy creates files in every folder you've set for Synchronzing. It's been some time, but SyncToyDirectoryId.txt appears to be the name. Also look for SyncToy_*.dat -- where * is replaced by a long string of characters.

Goodysnc creates folders within your sync pairs, optionally configured to be on only one of the sides of the pair, _gsdata_ which is used to keep track of status and retain backups of deleted copies.

-steve

_________________
stephen boots
Microsoft MVP 2004 - 2020
"Life's always an adventure with computers!"


Top 
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 79 posts ]  Go to page 1, 2, 3, 4  Next

Board index » Technical Forums » Programs (Applications)


Who is online

Registered users: No registered users

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Similar topics


Jump to: