I'm trying to sync the entire C:\ drive (with certain exclusions) of a Windows 7 PC. However, with the new protections build in to this version of Windows, FreeFileSync is not able to write to the C:\ drive. This results in the following errors. Are there any workarounds?
Cannot set directory lock for 'C:\'.
Cannot write file 'C:\sync.ffs_lock'.
Error Code 5: Access is denied. (CreateFile)
Cannot set directory lock for 'C:\'.
Cannot write file 'C:\sync.ffs_db'.
Error Code 5: Access is denied. (CreateFile)
Sync Windows 7 Protected Directories
- Posts: 2
- Joined: 11 Nov 2013
- Site Admin
- Posts: 7212
- Joined: 9 Dec 2007
You need to elevate the FFS process to have admin rights.
- Posts: 2
- Joined: 11 Nov 2013
That works when launching manually, but there is no way to do that when launching automatically at startup (i.e. when adding RealtimeSync to the startup folder)
- Posts: 4
- Joined: 14 Nov 2013
I think you can set "run as admin" in the properties (right click) for the RealTimeSync executable - look in the Compatibility tabThat works when launching manually, but there is no way to do that when launching automatically at startup (i.e. when adding RealtimeSync to the startup folder)sc52309
- Posts: 5
- Joined: 27 Oct 2012
For those the beginners, here is are more details on the very correct solution of Zenju and steve-p.
If you run the synchronization using the batch file created by FFS, then you can't "Run as Admin" because this option is not available in the right-click menu.
What you need to do in that case is to set the FreeFileSync program itself to run as Admin, not the batch. To do so:
- Go in the folder where FFS is installed (on my computer it's C:\Program Files\FreeFileSync\)
- Right click on the FreeFileSync.exe file (the one with the two green arrows)
- Properties
- Compatibility tab
- Check the box "Run this porgram as an administrator"
- Click Apply
- Click Ok
Now you should be able to double-click the batch file without having the error you mentioned.
If you run the synchronization using the batch file created by FFS, then you can't "Run as Admin" because this option is not available in the right-click menu.
What you need to do in that case is to set the FreeFileSync program itself to run as Admin, not the batch. To do so:
- Go in the folder where FFS is installed (on my computer it's C:\Program Files\FreeFileSync\)
- Right click on the FreeFileSync.exe file (the one with the two green arrows)
- Properties
- Compatibility tab
- Check the box "Run this porgram as an administrator"
- Click Apply
- Click Ok
Now you should be able to double-click the batch file without having the error you mentioned.