Unattend Install of New Fonts

October 29, 2008

So…I’ve found myself in the need to install new fonts to my OS Image.

I’ve already read some things in the past about this, and tried a couple of things to silently install fonts.
The approachs were things like, copy the font to %systemroot%\fonts; Copy the font to %systemroot%\fonts and add a registry key.

At least for me, this didn’t work almost eveytime.

So I googled a little and found a useful resource from the MS Technet Scripting Guy!

So here’s an example of what you need to do:

Const FONTS = &H14&

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(FONTS)

objFolder.CopyHere "C:\Maestro\Fonts\BesSanR_.ttf"

And this little piece of code really works great!

For more information please visit the Scripting Guy website (link)


VBScript – How to avoid “Open file – Security Warning” prompt

October 23, 2008

Because of the need to install some hotfixes separated from the OS Packages way, I’ve created a script (VBScript) to install them.

Then I call them from my task sequence (TS) and started the deployment process.
When the TS got to the step to run my newly and pretty awesome ( no kidding! :) ) vbscript everything got stucked in transit!

For some reason the step could not be performed and seemed to got into a strange loop.
I stop the TS and aborted the deployment process to take a look for bugs on the script. Nothing found at the first sight.

Then went to the command-line and run the script. What I was looking then was a pretty nasty, bad ass “Open file – Security Warning” dialog box. A good security feature but not quite good when your trying to deployment in unattended mode…

But take no mistake, good mother Microsoft has the solution. In the following article, that works for Windows Vista too, there is a workaround/solution for this.

This is a sample script to avoid the issue:
<code>
set objWshShell= CreateObject(”Wscript.Shell”)
set objEnviroment = objWshShell.Environment(”PROCESS”)

‘Disable the “Open File – Security Warning”
objEnviroment (”SEE_MASK_NOZONECHECKS”) = 1

‘Install your security updates
objWshShell.Run “c:\ms04-038\WindowsXP-KB834707-x86-enu /quiet /passive /norestart”,0,True

‘Enable the “Open File – Security Warning” again
objEnviroment .Remove(”SEE_MASK_NOZONECHECKS”)
</code>

For more information, please read the KB article:
http://support.microsoft.com/kb/889815/en-us


Using the task sequecence default environment variables

October 22, 2008

This week, continuing the work I’ve been developing with the Windows VIsta deployment, I got myself into a problem that I didn’t have an idea of how to resolve it.

I needed to copy some files specific of the task sequence I was running, and I wanted that to be exact same command for all task sequences.

For a instance, imagine you need to copy the files and folders located on Z:\Control01\TS_Specifc\*.*
001 corresponds to the task sequence ID and that is a variable used by the MDT process.

To get that ID you’ll use the environment variable %TASKSEQUENCEID%

So, my command-line (that I had to my task sequece) and can be used for all task sequences will be:
xcopy Z:\Control\%TASKSEQUENCEID%\TS_Specific\*.* /E C:\folder

With this, you have a command-line to use with all task sequences and also you can change the build id with problems.

Other usefull environment variable you can use is %TASKSEQUENCENAME% that, like it’s said, makes it possible to get the Name of the task sequence you’ve created on the MDT Workbench.

Just be carefull if the Name as more then word (ex.: Branch Desktops), because in this cases you’ll need to use the variable like this:
"%TASKSEQUENCENAME%"

For a complete list of the default variables created by MDT you can go, during the installation process to:
C:\MININT\SMSOSD\OSDLOGS and take a look at the file variables.dat. You can use notepad to look at it or rename it to .xml and see it on Internet Explorer


ZTI ERROR – Unhandled error returned by ZTIPatches: Object required (424)

October 19, 2008

Ok…

This is a very strange behavior that I need to take a deep investigation because I really can’t understand it.

I’ve been using the same unattend.xml file for testing purposes for a long time, but…this weekend I’ve haded some hotfixes to the OS Packages section, via the MDT Workbench.

After updating my Deployment Point, I’ve started the installation and almost immediately after starting the deploy, I got an error called:

<code>ZTI ERROR – Unhandled error returned by ZTIPatches: Object required (424)</code>

Because the only thing I’ve done was the insertion of hotfixes I’ve took them all except one. The error persisted! A very strange thing…

Looking closer to the bdd.log, located on C:\Minint\SMSOSD\OSDLOGS\, I’ve noticed an error with something like:

<code>Invalid character (…)</code>

I’ve googled it a little and someone was having a similar problem because of the use of a Norwegian character. After a search on my unattend I’ve realized I was using the name of the enterprise where I work, with a special character:
Espírito instead of Espirito.

After updated my deployment point…here we go again…everything works fine! :)

The really strange thing here it’s…why the hll does this just happened after adding hotfixes?


How to Disable the “Set Network Location Prompt”

October 18, 2008

For professional reasons, I came across an issue where I needed to disable the Network Location prompt window.

This prompt appears when you connect to a new network and ask you whether the new network is:

- Public
- Work
- Home

This makes it possible to Windows Vista to internally set the best configurations for the location you’ve choosed.

In my case, all the networks that my machine will ever know in their live it Work! Work! Work! Work! Work! Work!, so I didn’t need that prompt.

After some research I saw one first registry tweak that for some reason couldn’t get it working.
The registry command-line was something like:

reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t REG_DWORD /d 00000001 /f

Well, for some reason this didn’t work for me, so I’ve googled a little for a solution.

The I’ve found a fantastic blog, hosted by the same people that hosts this blog too (http://www.ostreff.info).

The registry key command-line suggested here, works just fine for me. And for that…thank you!
So…here it goes the steps needed:


Create a new Registry key (without any value) called NewNetworkWindowOff in:
HKLM\SYSTEM\CurrentControlSet\Control\Network\NewNetworkWindowOff

I just hope this helps you as much as it helped me!


BlogCastRepository – A lot of info in 1 place

October 8, 2008

Today this post its just to give you all, a website that I’ve found that, really is a good source for knowledge.

 It’s called BlogCast Repository and it offers, mainly for free a lot of webcasts about a large number of categories like Windows Server, MOM, Office, BDD/MDT, SoftGrid, Scripting, and a lot more.

I believe this really is a valuable website.

Please check it at:
http://blogcastrepository.com/