Can someone share with knowledge about custom action in MSI, what I need is custom action which checks type of model on XP OS and if it is correct the installs the drivers if not then skips.

I have no idea that there is such but I may think that some of you may know it.

0 Comments   [ - ] Hide Comments


Please log in to comment

Community Chosen Answer



you can use wmi to get info also

wmic csproduct get name

then use it a a script like:

REM do a wmi query to get the info we want and put it in a variable
FOR /F "tokens=2 delims==" %%A IN ('WMIC csproduct GET Name /VALUE ^| FIND /I "Name="') DO SET machine=%%A
ECHO Computer model: "%machine%"

REM Now we have the model in a variable we can do some logic and run commands, for example...
REM Watch for stray spaces at the end, take out all spaces with: SET machine=%machine: =%
IF /I "%machine%" == "Latitude E6410" (
REM do something specific for an E6410
) ELSE (
REM do something for other types

Answered 08/01/2012 by: SMal.tmcc
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity



I'm not sure of any native way to make a MSI look for a model. However you can make an easy script to verify the make or model of a workstation prior to installing the MSI package.


 Dim objWMI : Set objWMI = GetObject("winmgmts:")
Dim colSettingsComp : Set colSettings = objWMI.ExecQuery("Select * from Win32_ComputerSystem")
Dim colSettingsBios : Set colSettingsBios = objWMI.ExecQuery("Select * from Win32_BIOS")
Dim objComputer, strModel, strSerial
For Each objComputer in colSettings
  strModel = objComputer.Model
For Each objComputer in colSettingsBios
  strSerial = objComputer.SerialNumber
wscript.echo strModel
wscript.echo strSerial

This will return the SN and model of the computer. If you modify this to do an IF statment to RUN your package when they match, this should do it for you.

If strModel = "ProLiant ML110 G6" Then Call InstallPKG


Sub InstallPKG


end sub

Just modify the code to how you want it. Then just run the VBScript and not the MSI to verify for you if the model matches. You can use other WMI fields to check for OS, RAM, Speed, etc...


Hope this helps.

Answered 08/01/2012 by: AgentMrQ
Senior White Belt

Please log in to comment
This content is currently hidden from public view.
Reason: Removed by user request
For more information, visit our FAQ's.


SCCM can handle this with its own in-built queries, so that you populate a collection to deploy to based on model number etc.


If you don't have a deployment method that can identify these items, then the script above would do the job.


Hope that helps,



Answered 08/01/2012 by: dunnpy
Red Belt

Please log in to comment