Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


MRLunchBox

Windows 7 Image - Drive install based on self detection

Recommended Posts

Greetings,

 

I currently work in a new company.  I got laid off while working from home at my last place so I lost half of my own KB I build, specifically on imaging.

 

I know how to use ImageX, and how to sys prep etc.  At my new place I'm setting up a MDT 2013 server.

 

My issue.

 

This company has a very high number of in comind/out going employees so using MDT, Altriris, SCCM will not work here. 

We have disk clonners that will allow use to have  a master and then clone from that master.  I can come up with a few different methods for detecting the hardware then injecting/adding the correct drivers.

 

My method won't work with the disc cloning because I need to add some logic to detect the hardware on boot up.  (this is where my notes would have saved me but I was not allowed to copy my documented knowledge).  I'm thinking of using the "SetupComplete.CMD" script.  I have used this to deleted the unattended xml file.

 

I know I can use the same script (or should be able to) to detect the hardware using WMI.

 

My image would have probably a folder called c:\Drivers  (or C:\ProgramData\Tools\Drivers), then the SetupComplete.cmd would run a "WMIC ComputerSystem Get Model" and if this equal lets say Dell OptiPlex 790 then go to that folder to install drivers OR copy that folder into  C:\Windows\INF which then would install the drivers.

 

With this method, I guess I can sysprep, then clone the drive (my master) then stick a copy of the master into the disk cloning devices to close multiple drivers at once and then when the drivers are ready, walk up to the desk, swap the drive, spend 15 minutes setting up the last few steps.

 

What is the best method to detect the hardware?

Will my sudo method work?  If so, how do I detect the hardware then use that to install the drivers?

 

Any suggestions?

 

Thank you

 

 

 

Share this post


Link to post
Share on other sites

I use WMI to determine manufacturer and model and them use appropriate scripts based on those values. I don't use WMIC, I use Autoit, but the result is the same. I also can't share specifics but I can give you a basic idea.

After imaging is complete, detect the hardware. Then copy the driver/application set to the system. On first boot, I have another program that looks for what needs to be installed and runs the appropriate commands.

Share this post


Link to post
Share on other sites

Does anyone have any suggestions on using the SetupComplete.cmd to detect hardware and then copy the correct drivers into the INF folder?

Share this post


Link to post
Share on other sites

I might suggest that if you're using WinPE to deploy Windows 7, you use DISM to deploy the image and inject drivers into the image while in Windows PE.  That's how I'm doing it with a custom AutoIT script - it deploys a WIM image, and detects / installs the correct drivers based on model. You just need to select 3 things in the script - WIM image, Target, and base location of the drivers.

 

It's a very similar method that Microsoft's SCCM would deploy Win 7.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...