The Deployment Bunny

OS Deployment, Virtualization, Microsoft based Infrastructure…

Archive for June, 2011

Just for fun: The difference between Me and Johan is…

Posted by Mikael Nystrom on June 9, 2011

As might have notice, I do a lot of things with my friend Johan Arwidmark (he also happens to be a fellow MVP) and there are many attendees at the different conferences that that claims that we so much alike. Well the professional side of both of us are pretty much the same, not always (we still fight over things just because we can).

But there are some serious differences. This should give you a hint… (Remember, Chaos is not always a bad thing, ok)

chaos and order

/mike aka the Deployment Bunny

Posted in Uncategorized | 3 Comments »

Event:–Sommarkollo in Sweden

Posted by Mikael Nystrom on June 9, 2011

Here is my sessions at Sommarkollo – Sweden 2011. Now it is time for YOU to reserve your space in this sessions, my sessions tends to be “full” pretty fast.

Göteborg

Göteborg – 28/6 – Hur installerar jag Windows 7 i små, stora och enorma miljöer (Göteborg)

Göteborg – 28/6 – Nu har vi kört Windows 7 i 12 månader – tips & tricks (Göteborg)

 

Malmö

Malmö – 29/6 – Hur installerar jag Windows 7 i små, stora och enorma miljöer (Malmö)

Malmö – 29/6 – Nu har vi kört Windows 7 i 12 månader – tips & tricks (Malmö)

Malmö – 30/6 – Virtualisering av Windows 7 och Windows Server (Malmö)

Malmö – 30/6 – Presentationsvirtualisering och applikationsvirtualisering (Malmö)

 

Stockholm:

Stockholm – 16/8 – OEM Pre Installation Kit – Värt guld för dej som bygger egna datorer för försäljning (Stockholm)

Stockholm – 16/8 – Microsoft HydrationKit (Stockholm) (If Deployment is your thing – This one is a MUST for you, pretty advanced stuff and FUN)

Stockholm – 17/8 – Hur installerar jag Windows 7 i små, stora och enorma miljöer (Stockholm)

Stockholm – 17/8 – Nu har vi kört Windows 7 i 12 månader – tips & tricks (Stockholm)

Stockholm – 18/8 – Virtualisering av Windows 7 och Windows Server (Stockholm)

Stockholm – 18/8 – Presentationsvirtualisering och applikationsvirtualisering (Stockholm)

Stockholm – 24/8 – Servervirtualisering med HyperV och SCVMM (Stockholm)

/mike

Posted in Uncategorized | Leave a Comment »

MCT Summit – Stockholm – 2011

Posted by Mikael Nystrom on June 9, 2011

Here are the Sessions that Johan and I will do at the MCT Summit in Stockholm.

image

/mike

Posted in Uncategorized | Leave a Comment »

Nice to know: – Why did Windows 7 pick THAT driver ?

Posted by Mikael Nystrom on June 6, 2011

Working with customer is fun and challenging, best thing is that the ask very relevant question, questions that I asked my self long ago but never gave it any thoughts. Recently a customer asked me, “How do make Windows pick the correct driver?” and that my friends are a really god question

The secret behind this is called ranking, ranking occurs when drivers are added to the driver store and that happens of course when we deploy a new Windows 7 machine and drivers are injected. When using MDT in a LiteTouch configuration, the LiteTouch script will do a Plug and Play scanning of the hardware and the use the information the get the correct drivers from the MDT out-of box drivers folder. Now, MDT cant really “know” if that particular driver is the perfect driver so it will copy all drivers to the \Drivers folder on the machine to be deployed. But if you use Driver Groups or any other method that will “filter” the drivers the script would then only copy the one and only driver need.

Well that’s in the perfect word and since that does not exist we will get multiple drivers copied down to the \Drivers folder and then when MDT (using DISM in a offline mode) pushes those drivers into the OS there will be scenarios when we are going to have drivers that have the same PNP number and Windows must choose the correct one and now its time for ranking. In the best of worlds, when all the vendors created perfect drivers and everyone is always running the latest and the greatest this would not be a problem. But in the reality not all vendors have a perfect .inf file, in fact some of them are uglier then others and they does not even work.

Before we go into details on how that work, you might want to know how to “see” this, well that is not a secret there is of course a log file for that and the logical name for that is c:\Windows\inf\setupapi.dev.log and here is a sample where it just happens to be two drivers to pick from: (This log files has been modified and shortened just to show you)

The answer is in setupapi.dev.log

     dvi:      Enumerating INFs from path list ‘C:\Windows\inf’
inf:      Opened PNF: ‘C:\Windows\System32\DriverStore\FileRepository\usb.inf_amd64_neutral_e2b28ecac19a29af\usb.inf’ ([strings.0409])
dvi:      Created Driver Node:
dvi:           InfName      – C:\Windows\System32\DriverStore\FileRepository\usb.inf_amd64_neutral_e2b28ecac19a29af\usb.inf
dvi:           Rank         –
0x00ff2007
dvi:      Created Driver Node:
dvi:           InfName      – C:\Windows\System32\DriverStore\FileRepository\ewusbdev.inf_amd64_neutral_7ed8b2230e11292c\ewusbdev.inf
dvi:           Rank         – 0x00ff0001
inf:      Searched 2 potential matches in published INF directory
ndv:      Selecting best match from Driver Store (including Device Path)…
dvi:                Selected:
dvi:                     Description – [HUAWEI Mobile Connect - USB Device]
dvi:                     InfFile     – [c:\windows\system32\driverstore\filerepository\ewusbdev.inf_amd64_neutral_7ed8b2230e11292c\ewusbdev.inf]
dvi:                     Rank        – [0x00ff0001]

setupapi.dev.log  explained

    • Windows is missing a driver for 0x00ff2007
  • It finds two INF files that could be used
  • By “ranking” them Windows then make a decision
  • The driver with the lowest value wins, since that just have to be the best…
  • In this case
  • 0x00ff0001 is lower then 0x00ff2007 and therefore the HUAWEI Mobile Connect – USB Device is better then a generic USB driver

 

Why and how?

It is always nice to know what all these number means and here it is:

(The official “not so easy to understand” page is here http://msdn.microsoft.com/en-us/library/ff546225(VS.85).aspx“)

The ranking number is divided into 3 parts 0xAABBCCCC

  • AA stands for: – “Signature Code”
    • This one is easy, 00 means its signed, ff means that it is not signed. You can also see how the signer is in the log file
  • BB stands for: – “Feature Score”
    • Well, here is when the fun begins, the feature score is something the vendor decide by themselves, but to be honest I have not seen this being used by anyone. It should popup in the .inf file if they do.
  • CCCC stands for: – “Identifier Score”
    • This is also pretty simple, almost every device have at least for different PNP number, here is my NVidia card

image

And you can see that I have four different PNP numbers on this one, the top one is the exact match, the bottom is kind of generic. The better driver I have the better it will match the top of this list and that will make a low value.

So the best driver you could possible have is 0×00000000, but I have not really seen that kind of driver (yet)

You can find some more information on TechEd on this here:

/mike aka Deployment Bunny

 

Posted in Deployment, Drivers | Tagged: , | 6 Comments »

Nice to know: – Blocking OS install on unsupported models in Microsoft Deployment Toolkit (MDT)

Posted by Mikael Nystrom on June 4, 2011

A customer asked me:

- Is it possible to block an attempt to upgrade, refresh or install the Operating System if that model is not “certified?

– Yes, we can set the OSinstall property to N based on model, that will block any attempt

- But that will block that model from running any Task Sequence? That is not what I want…

Well, that is correct, so I needed a way to block that particular model on that particular Task Sequence, so I  would like something a bit more sophisticated, something like this:

For task sequence “Windows 7 Enterprise x86 – Basic” the following models are supported and for the task sequence “Windows Server 2008 R2 – Basic” the following models are supported (or something like that)  and here is how you do it:

(This has been tested on MDT 2010, MDT2010 update 1 and MDT2012)

Create a new group in your task sequence

  • Open up your deployment workbench
  • Open your task sequence
  • Add a new group called “Certified Hardware”

Like this:

image

Setting condition on the group

  • Select the group Certified Hardware
  • Select Options for that group
  • Add the following condition:

Task sequence variable “Model not equals HP ProBook 5310m” (if that is the model that you support for this Task sequence)

Like this:

image

Adding the “blocker”

  • Select the group
  • Add a “Set Task Sequence Variable”
  • Task Sequence Variable = OSInstall
  • Value = N

Like this:

image

Adding script that will write in the log and display “why” the OS install failed

Without this step it will just display a “failed”, but maybe, just maybe you would like to have it a bit more sophisticated. So let us add a script

The script should go into the Scripts folder and you can download it from my SkyDrive http://cid-8563304f134ddcb6.office.live.com/self.aspx/BlogFiles/ZTIUnSupportedHardware.zip

  • Download it
  • Extract it
  • Save it in the scripts folder
  • Add a run command before the Set Task Sequence Variable
  • Use this command : cscript.exe “%SCRIPTROOT%\ZTIUnSupportedHardware.wsf”

It should look like this:

image_thumb[3]_thumb[1]

Let us take a look in the BDD.log file

Here is how it looks in BDD.log

image_thumb[7]_thumb[1]

Next step

With this in place you can prohibit installations of Domain Controllers on Laptops, Hyper-V servers on Virtual Machines and people trying to refresh a Machine from XP to XP even if you have NO device drivers for that model, my guess is that this will solve a couple of “Ops, sorry”

If you want to you can add scripts and other logic to this, things that automatically runs a scripts that will collect the hardware information to a log so that you then can figure out what drivers are needed or something like that, or you could add the “Send Email” script so it will send an email to you saying that some “schmuck” tried to do something bad. You could also add the userexit script for ModelAlias and use that. You could also add other conditions, like Firmware, certain kind of hardware and so on. It would be for example possible to run a Web Services that checks if this computer is correctly added into the asset management database or something like that.

Yes, you can also use CustomSettings.ini to perform similar

And here is a couple of samples of that:

Sample No:1 – Blocking on Model

Here is the “easy” way, the only downside with this one is that it will only block based on Model and that could be perfectly ok in many situations.

[Settings]
Priority=Model, Default
Properties=MyCustomProperty

[Default]
OSInstall=N

[HP ProBook 5310m]

OSInstall=Y

[Virtual Machine]
OSInstall=Y

Sample No:2 – Blocking on Model + Task Sequence:

In this sample we create one property and two priority blocks. If we run this WHEN the task Sequence is known (That means that you need to re-run the gather process with “process rules”, ZTIGather will set the model + Task Sequence ID in to the property Model_TS in the [Init] section, it will then process the [CertifiedHardware] section and the use the Subsection to continue to the section that matches the Model+Task Sequence ID, in this case since my machine is a VM running on Hyper-V it will be “Virtual Machine” and if the Task Sequence is W7X64 it will process the [Virtual Machine_W7X64] section and OSinstall property will be set to Y.

[Settings]
Priority=Init, CertifiedHardware, Default
Properties=MyCustomProperty, Model_TS

[Init]
Model_TS=%Model%_%TaskSequenceID%

[Default]
OSInstall=N

[CertifiedHardware]
SubSection=%Model_TS%

[Virtual Machine_W7X64]
OSInstall=Y

More tips…

You can of course block OS install temporary, during maintenance could be a valid scenario. A good friend (And fellow MVP) Maik Koster created a solution for that (I tricked him into it) and you can read a bit more about it here. http://myitforum.com/cs2/blogs/maikkoster/archive/2011/04/05/implementing-a-very-simple-maintenance-mode-in-mdt-litetouch.aspx

And here are some more discussions on how to pick the info from the Database: http://social.technet.microsoft.com/Forums/en-US/mdt/thread/412e54d9-549f-4828-9d5d-d41d14df77e8

/mike aka the Deployment Bunny

Posted in Deployment, Drivers, TechEd, Windows 7, Windows Server 2008 R2 | Tagged: , , | 2 Comments »

 
Follow

Get every new post delivered to your Inbox.

Join 1,654 other followers