كيفية اكتشاف ما إذا كان Microsoft ActiveSync مثبتًا على جهاز الكمبيوتر
-
06-07-2019 - |
سؤال
ما هي الطريقة الأفضل/الأكثر موثوقية لاكتشاف ما إذا كان Microsoft ActiveSync مثبتًا على جهاز الكمبيوتر؟يستخدم برنامج الكمبيوتر الخاص بي RAPI لإخراج الملفات من الجهاز، وإذا لم يتم تثبيته، فسيكون هناك خطأ يتمثل في عدم إمكانية العثور على RAPI.dll.
المحلول
ويمكنك قراءة التسجيل للكشف إذا تم تثبيت اكتف
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE Services
نصائح أخرى
/// <summary>
/// Checks to see if ActiveSync/Windows Mobile Device Center
/// is installed on the PC.
/// </summary>
/// <param name="syncVersion">The version of the synchronization tool installed.</param>
/// <returns>True: Either ActiveSync or Windows Mobile Device Center is
/// installed. False: version is null
/// </returns>
private static bool isActiveSyncInstalled(out Version syncVersion)
{
using (RegistryKey reg =
Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows CE Services"))
{
if (reg == null)
{
syncVersion = null;
return false;
}
int majorVersion = (int)reg.GetValue("MajorVersion", 0);
int minorVersion = (int)reg.GetValue("MinorVersion", 0);
int buildNumber = (int)reg.GetValue("BuildNumber", 0);
syncVersion = new Version(majorVersion, minorVersion, buildNumber);
}
return true;
}
يمكنك أيضًا التحقق مما إذا
C:\Windows\System32
api.dll موجود
هل حاولت تضمين ملف Rapi.dll مع طلبك؟
لا تنتمي إلى StackOverflow