View Full Version : Example IS script using WMI, anyone?

01-10-2005, 11:19 AM
Would some post (or provide a link to) an IS script utilizing WMI? I can't find any on this site. Thanks.

01-10-2005, 02:40 PM
I do not think my example is probably exactly what you are requesting, but maybe it will be of some help to you.

02-15-2008, 04:15 PM
Somebody - thank you for sharing that ingenious method of accessing WMI through InstallScript. I had started to dive into using the 'foreach' DLL, but decided against it due to having a DLL dependency. Your method is more self-contained.

For my purposes, I queried Win32_ComputerSystem instead of Win32_Registry. The values I needed to access were STRINGs, so I returned that type instead of LONGs. Simple tweaks :)

Christopher Painter
02-15-2008, 09:18 PM
I've found the for each dll on InstallSite to be bulletproof over the years. I add it to my installs without hesitation ( although I still gripe that InstallScript STILL doesn't have a collection enumerator command yet ).