17-10-12, 04:51 PM
كاتب الموضوع : AhmedEssawy
في القسم العام :كود :
Imports Microsoft.Win32
Public Enum MSApplications
WORD
ACCESS
EXCEL
End Enum
كود :
Public Function isInstalled(ByVal App As MSApplications)
Dim strSubKey As String
Select Case App
Case MSApplications.ACCESS
strSubKey = "Access.Application"
Case MSApplications.EXCEL
strSubKey = "Excel.Application"
Case MSApplications.WORD
strSubKey = "Word.Application"
End Select
Dim objKey As RegistryKey = Registry.ClassesRoot
Dim objSubKey As RegistryKey = objKey.OpenSubKey("Word.Application")
Return Not objSubKey Is Nothing
objKey.Close()
End Function