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 

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
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

1

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

Answered 06/03/2014 by: dugullett
Red Belt

  • 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
    • 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.
      • 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 :)
      • 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
      • Just mark it as answered, and list your steps in the answer summary.
Please log in to comment

Answers

This content is currently hidden from public view.
Reason: Removed by member request
For more information, visit our FAQ's.

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....

Answered 06/10/2014 by: EdT
Red Belt

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