Reputation:
I have tried to fix a method that checks if the user has Skype installed on his computer. This I fixed / come up with:
Does anyone have any ideas on how to check if Skype is installed on the computer?
The method I used are simillrar to this one:
Method to loop through all installed programs
Upvotes: 5
Views: 3258
Reputation: 4666
Just use the registry:
using Microsoft.Win32;
//Function uses Microsoft.Win32 to check registry value of
//HKEY_CURRENT_USERSoftwareSkypePhoneSkypePath and returns false if
//the key is null
private bool isSkypeUser()
{
RegistryKey skype = Registry.CurrentUser.OpenSubKey(@"SoftwareSkypePhone");
if (skype != null && skype.GetValue("SkypePath") != null)
{
return true;
}
else
{
return false;
}
}
http://brcline.com/blog/?tag=skype
EDIT:
A dirty workaround is to loop through the StartMenu folders looking for the Skype shortcut or folder. You must use the following SpecialFolder enumeration:
var startMenuPath = Environment.GetFolderPath(Environment.SpecialFolder.CommonPrograms)
Hope it helps!
Upvotes: 6