/build/static/layout/Breadcrumb_cap_w.png

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 


0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
@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
Posted by: dugullett 9 years ago
Red Belt
2

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 9 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 9 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 9 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 9 years ago
      • Just mark it as answered, and list your steps in the answer summary. - dugullett 9 years ago
Posted by: EdT 9 years ago
Red Belt
0

Get yourself a free copy of WMIExplorer.exe (google for it) as this has all the methods you need and you can run it on your target system to see what it returns for commands such as W32_System_Enclosure (IIRC) for example....

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ