While programming the App-V Self Support tool I noticed that application Icons are stored in a lot of different places.
Here’s some places where you can look for:
1: User’s Icon Cache. By default located in %Appdata%\Softgrid Client\Icon Cache
2: Public Icon Cache. By Default located in Public Documents
3: A direct approach: In the folder where the SFT and OSD of the package reside:
You can use code like this:
string orgOsdPath = "";
RegistryKey appsKey = appVKey.OpenSubKey("Applications");
orgOsdPath = appsKey.OpenSubKey(<<Full Name of App-V application>>).GetValue("OriginalDescriptionURL").ToString();
DirectoryInfo di = new DirectoryInfo(Path.GetDirectoryName(orgOsdPath));
string icopath = di.FullName + "\\" + di.Name + " Icons\\" + Path.GetFileNameWithoutExtension(orgOsdPath) + ".ico";if(File.Exists(icopath))
{
Do something with: icopath;
}



No comments:
Post a Comment