Wednesday, November 14, 2012

Setting native resolution in MDT

One thing I have struggled with in using MDT for enterprise wide imaging is how to set native resolution across various models in the environment. I tried scripted solutions, creative unattend.xml editting, and modification of customsettings.ini to include logic for every model currently in the environment. Unfortunately, I vastly overthought things. As I woke up this morning, I thought to myself, "How would MDT/unattend.xml handle setting the resolution outside of the supported range?" It turns out it does it quite gracefully by setting the display to maximum native resolution.

In short, the two lines below added to customsettings.ini resolved 3 weeks worth of headaches.

XResolution=2560
YResolution=2048

With that - no more ugly desktops after imaging. :)

Monday, November 12, 2012

.NET 1,1 does not like to play well in Task Sequences



I thought I would take a moment to point out something I found during the attempted silent installation of .NET Framework 1,1.

Generally in silent installation this type of executable, you would initially run the following from command prompt.

Installername.exe /? OR installername.exe -? (With older style Unix attributes. These are increasingly rare)




As you see here, it tells you to call the /Q command-line parameter to obtain a silent install.

Unfortunately, this does not work. Executing dotnetfx.exe /Q yields the following:





And then:





Hmm. What do we do now? Looking back at the informational window that dotnetfx.exe /? yielded, let’s try the /c command line parameter to see what extracts from the exe.
 





Yielding:





Cool! Now we have an exe to play with! Yay! Let’s see if install.exe has any command-line parameters.



Hmm. It doesn’t look like it, does it? Well, this is where the undocumented part of the install comes into place. There is an undocumented /q(n|b) switch that can be parsed to install.exe to install silently. How do we make this work during an application task sequence installation without prestaging the source? Pretty easily with the following:

dotnetfx.exe /q:a /c:"Install.exe /l /qb"

/q:a – Quietly suppresses the extraction called by /c
/c:”install.exe /l /qb” with /c extracting the files and everything inside :“” is being called afterwards with /l for logging and /qb for silent installation.

There you have it. The mysteries of .NET 1,1. :)