If you read the post on how to customize SMS 2003 Resource Explorer icons, then you'll have the history behind why I decided to figure this out. You probably also noticed that I said not to try those steps on Configuration Manager 2007 sites and wondered why.
After figuring out how Resource Explorer decides on which icon to display in SMS 2003, I started poking around a Configuration Manager 2007 installation…and noticed that the files I was looking for either didn't exist or didn't work the same way. Sure, you might find some of the files that I referenced for configuring SMS 2003 icons, but they won't help you out in this particular endeavor. Resource Explorer was recoded for Configuration Manager and changes were made to how these icons are assigned.
In fact, if you try to do it the other way, you'll end up with things like this in your resourceexplorer.log file:
The 'resource' (Microsoft.ConfigurationManagement.AdminConsole.UIResources.SMS_G_System_PHYSICAL_MEMORY.resources) was not found.\r\nSystem.Resources.MissingManifestResourceException\r\nCould not find any resources appropriate for the specified culture or the neutral culture. Make sure "Microsoft.ConfigurationManagement.AdminConsole.UIResources.SMS_G_System_PHYSICAL_MEMORY.resources" was correctly embedded or linked into assembly "AdminUI.UiResources" at compile time, or that all the satellite assemblies required are loadable and fully signed.\r\n at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
"Linked into assembly AdminUI.UiResources" …eh? what? After giving the log the 'what look' for about 30 seconds, I decided it was time to call for back up. Its times like these that make me happy to work on the team that I'm on—I just had to find the developer who made the changes and/or knew enough about the process to give me a hint. Luckily, that person appeared from the mists (OK, really the third floor of my office building) with all the answers I was looking for—cue Jun Wang 'developer extaordinaire'.
So, after some wise words from Jun, it became apparent that I should forget everything I knew about how to do this in SMS 2003. The files you should concern yourself with in Configuration Manager sites are the adminui.uiresources.dll and the managementclassdescriptions.xml files:
- The adminui.uiresources.dll file (located at .\Microsoft Configuration Manager\AdminUI\bin\adminui.uiresources.dll) contains all of the icons used in Configuration Manager's implementation of Resource Explorer.
- The managementclassdescriptions.xml (located at .\Microsoft Configuration Manager\AdminUI\XmlStorage\ConsoleRoot\managementclassdescriptions.xml) is the file that tells Resource Explorer which icon to display.
Important: As usual with "hacks" like this, the information in this post is in no way supported by Microsoft (or me) and should only be used at your own risk if you want to fancy up your Resource Explorer icons similar to how Flo tricked out her name tag on those insurance commercials on TV.
If you want to change the icon that is displayed for a particular inventory class, you need to pop open the managementclassdescriptions.xml file and change some .xml (make sure you back up the original first!). For this example, I just opened it with notepad.exe and scrolled down until I found the class I wanted to modify. In this example I'm using the CD-ROM class and the snippet in the .xml about it looks like this:
<ManagementClassDescription Name="SMS_G_System_CDROM" SuperclassName="SMS_G_System_Current">
<ResourceAssembly>
<Assembly>AdminUI.UIResources.dll</Assembly>
<Type>Microsoft.ConfigurationManagement.AdminConsole.UIResources.SMS_G_System_CDROM.resources</Type>
</ResourceAssembly>
<ImagesDescription>
<ResourceAssembly>
<Assembly>AdminUI.UIResources.dll</Assembly>
<Type>Microsoft.ConfigurationManagement.AdminConsole.UIResources.Properties.Resources.resources</Type>
</ResourceAssembly>
<ImageResourceName>System</ImageResourceName>
</ImagesDescription>
<Properties>
<ManagementClassPropertyDescription Name="Availability" Type="Integer" />
<ManagementClassPropertyDescription Name="Description" />
<ManagementClassPropertyDescription Name="DeviceID" />
<ManagementClassPropertyDescription Name="Drive" />
<ManagementClassPropertyDescription Name="GroupID" Type="InvariantInteger" />
<ManagementClassPropertyDescription Name="Manufacturer" />
<ManagementClassPropertyDescription Name="MediaType" />
<ManagementClassPropertyDescription Name="Name" />
<ManagementClassPropertyDescription Name="ResourceID" Type="InvariantInteger" />
<ManagementClassPropertyDescription Name="RevisionID" Type="InvariantInteger" />
<ManagementClassPropertyDescription Name="SCSITargetID" Type="InvariantInteger" />
<ManagementClassPropertyDescription Name="SystemName" />
<ManagementClassPropertyDescription Name="TimeStamp" Type="DateTime" />
<ManagementClassPropertyDescription Name="VolumeName" />
</Properties>
</ManagementClassDescription>
There's a lot of information there, but we're really only concerned with the <ImagesDescription> section:
<ImagesDescription>
<ResourceAssembly>
<Assembly>AdminUI.UIResources.dll</Assembly>
<Type>Microsoft.ConfigurationManagement.AdminConsole.UIResources.Properties.Resources.resources</Type>
</ResourceAssembly>
<ImageResourceName>System</ImageResourceName>
</ImagesDescription>
See how the image description says to go look in the AdminUI.UIResources.dll file and grab the icon named System to display for the CD-ROM class in Resource Explorer? Luckily, the icons are listed in the .xml as names and not ID's so we don't have to open the .dll and poke around to find an icon we like, we can just peruse the .xml for a name that sounds like something we're after…how about CD_Rom? Changing System to CD_Rom for that <ImageResourceName> line, saving the .xml, and then restarting Resource Explorer returns this result:
Before:
After:
That's better, and now you know how to change the default icons in Configuration Manager's version of Resource Explorer.
Adding custom icons is a bit more problematic. If you open the AdminUI.UIResources.dll file in Visual Studio, the icons are not listed the same way as they were in the SMS_RES1.dll file (the SMS 2003 .dll holding the icons) and you also can't add custom icon resources to that file. To add your own custom icons in Configuration Manager, you have to create a new .dll file, add your icon to that file, and then properly reference your custom assembly and icon name in the managementclassdescriptions.xml file.
That seems just a little bit too complicated to me to throw in at the end of this blog post and I'll have to write that up seperately. So, until then, that's all I've got to say about changing Configuration Manager 2007 Resource Explorer icons.
~Jeff