How to create a self install driver package which can identify the product manufacturer to install the right application?
Well hello, my name's Bruno, i'm new to IT Ninja, so sorry if i make any mistake in my very first post...
I know it's a little hard for a first post but... I need to create a self install package of drivers, containing drivers of a bunch of different notebook manufacturers and models (like HP, Dell, gateway and their models...), and io need this package to identify the equipment's manufacturer/model and install ONLY the drivers suited for it...
Can someone please send me a light?
Thanks a lot for your attention :)
Sincerely,
Bruno Bicudo
Answers (2)
@ECHO OFF 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 FOR /F "tokens=2 delims==" %%A IN ('WMIC csproduct GET Vendor /VALUE ^| FIND /I "Name="') DO SET machine=%%A
I'm not sure of your deployment method, but this is a post install task I use on my K2000. You should be able to convert it to what you need. This sets a machine variable. It then looks for that model, and installs the necessary drivers.
@ECHO OFF
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
rem ECHO Computer model: "%machine%"
IF /I "%machine%" == "Model1" goto Model1
IF /I "%machine%" == "Model2" goto Model2
IF /I "%machine%" == "Model3" goto Model3
goto End
:Model1
setup.exe /s
goto End
:Model2
setup.exe /s
goto End
:Model3
setup.exe /s
goto End
:End
Comments:
-
Man, that's AWESOME!!!
Just tell me something... Can i separate the manufacturer and the model in the result?
As for just capturing the manufacturer first (like HP or Dell) and after the model (like Probook 440s i.e.)... No doubt it can be done, but i have some problems when it comes to WMI :/
Thanks for everything until now :)
- See more at: http://www.itninja.com/question/how-to-create-a-self-install-driver-package-which-can-identify-the-product-manufacturer-to-install-the-right-application#answer-91403 - anonymous_108470 10 years ago-
I would assume you could modify the WMI to look for manufacturer. I've never tested though. I would run the WMI query above on that HP and check the results. If it does return results then you should be good. - dugullett 10 years ago
-
I tested it, and i was able to pick it up using "get Vendor".
Thanks a lot for your help!!! I'll finally be able to finish this :) - anonymous_108470 10 years ago -
Err... Only 1 more question... How do i mark your question as the best, or give you some kind of pontuation for the help? XD - anonymous_108470 10 years ago
-
Just mark it as answered, and list your steps in the answer summary. - dugullett 10 years ago