A possibility to programmatically check in .Net (with C#) if a pdf-reader is installed:
[TestMethod]
public void CheckPdfReaderAvailable()
{
RegistryKey key = Registry.ClassesRoot.OpenSubKey(".pdf");
Assert.IsNotNull(key);
}
Checking if Excel is installed can be achieved the following way:
[TestMethod]
public void CheckExcelAvailable()
{
RegistryKey key = Registry.ClassesRoot.OpenSubKey("Excel.Application");
Assert.IsNotNull(key);
}
Thank you. Works. Also in Windows 2008 (x64).
ReplyDelete