We do not want to synchronize files between our handheld device and a PC.
The portable device places certain (SQL CE databases) files in the \ My Documents folder on the handheld computer. These are, in particular, files that we do not want to synchronize with a PC.
I first added "sdf" (and "SDF" to be sure) to the "ExcludeExts" registry key. It did not help. Then I changed the registry keys "FileSyncPath" and "NoSubfolderIn" from the "My Documents" folder to the "profiles" folder:
private void UpdateRegistry()
{
RegistryKey key =
Registry.LocalMachine.CreateSubKey(@"SOFTWARE\Microsoft\Windows CE
Services");
if (key != null)
{
key.SetValue("ExcludeExts", "lnk,tmp,cdb,mdb,sdf,SDF",
RegistryValueKind.String);
key.SetValue("FileSyncPath", "\\profiles",
RegistryValueKind.String);
key.SetValue("NoSubfolderIn", "\\profiles\\",
RegistryValueKind.String);
}
}
There is nothing in the profiles folder except another folder that should be ignored due to the "NoSubfolderIn" registry key:

Changes were written to the registry on the device:

... .SDF \My Documents, :

? , .SDF , (IOW, " " , , -, , )? Windows CE Services? , , "Windows CE Tools":
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows CE Services <= It has one registry key, "DeviceFriendlyName"
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE Services <= shown in the scream shot above; it has several (7) registry keys
HKEY_LOCAL_MACHINE\Windows CE Tools <= It has one registry key, "Platform"
HKEY_LOCAL_MACHINE\Windows CE Services <= it empty
""? - ?
UPDATE
, , " Windows CE":
RegistryKey keyLocalWCES =
Registry.LocalMachine.CreateSubKey(@"Windows CE Services");
if (null != keyLocalWCES)
{
keyLocalWCES.SetValue("GuestOnly", 00000001
RegistryValueKind.DWord);
keyLocalWCES.SetValue("ExcludeExts", "lnk,tmp,cdb,mdb,sdf,SDF"
RegistryValueKind.String);
keyLocalWCES.SetValue("FileSyncPath", "\\profiles",
RegistryValueKind.String);
keyLocalWCES.SetValue("NoSubfolderIn", "\\profiles\\",
RegistryValueKind.String);
}
RegistryKey keyCurrentUser
Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Microsoft\Windows CE
Services");
if (null != keyCurrentUser)
{
keyCurrentUser.SetValue("GuestOnly", 00000001
RegistryValueKind.DWord);
keyCurrentUser.SetValue("ExcludeExts"
"lnk,tmp,cdb,mdb,sdf,SDF", RegistryValueKind.String);
keyCurrentUser.SetValue("FileSyncPath", "\\profiles",
RegistryValueKind.String);
keyCurrentUser.SetValue("NoSubfolderIn", "\\profiles\\",
RegistryValueKind.String);
}
... ! , , ?!
2
: (*.SDF , *.sqlite ) , , "FileSyncPath", , "FileSyncPath" , " " , , , , "" ". , , : . ActiveStync , , , " ".
, , , "FileSyncPath" (, , "NoSubfolderIn" , , , ) - , ( , , , ).