Reading WMI Information

When creating task sequences you’ll find yourself using alot of WMI filters to determine if a certain task needs ran on a machine. I’ve found WMI Reader to be an excellent tool to dig through WMI. It can be downloaded for free from softpedia.

Customize Windows 7 OEM Information

The following will show you how to customize the Windows 7 (and Windows Vista) OEM information to display information more specific to your environment. You’ll be able to add information like Manufacturer information, Support hours, Support phone number, and a Support website. (Oh yea, and add a custom logo image.)

The first thing you want to do (assuming you want to have your own logo image) is to create a 120 pixel by 120 pixel 24-bit bitmap image file. You’ll then need to place this file somewhere on the the local disk of the PC. I suggest creating a folder called OEM under the System32 folder and placing the image there with the name of OEMLogo.bmp. (C:WindowsSystem32OEM)

Now you need to open up the registry editor and go to HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionOEMInformation.

To add your custom logo, go tothe OEMInformation key create a new Reg_Z string value and name it Logo and give it a value of the path to the folder in which you put your image file.

To add a manufacturer name, create a Reg_Z string and name it Manufacturer and give it a value of whatever you would like the manufacturer to be.

To add support hours, create a Reg_Z string and name it SupportHours and give it a value of whatever you want your support hours to be.

To add a support phone number, create a Reg_Z string and name it SupportPhone and give it a value of whatever you want your support number to be.

To add a support website, create a Reg_Z string and name it SupportURL and give it a value of whatever your website is.

Look at the example image below if you’re not getting anywhere with the instructions above.

Here’s a quick registry import to.

Windows Registry Editor Version 5.00

“Manufacturer”=”Company Name”
“SupportPhone”=”1-800-888-8888 ″

Run As funcationality in Windows 7

By doing the following you’ll be able to get the “Run As” functionality back when you right click a shortcut or executable in Windows 7.

First obtain ShellRunAs from Windows Sysinternals. (Quick link here)

Next from the following command through command prompt.

shellrunas.exe /accepteula /reg /quiet

All done. You should now be able to right click shortcuts and executable’s and easily get a Run As prompt.

Installing Exchange System Manager for Exchange 2003 on Windows 7

This morning my colleague decided that he wanted to upgrade his XP machine to Windows 7. Other than myself, no one else on the support team had Windows 7, so the need to have Exchange 2003 tools integrated into Windows 7 wasn’t there until this morning. ( I always remoted into a Windows XP machine or into the server.)

So after looking into how to get Exchange 2003 tools on a Windows 7 machine, I came up with this.

  1. Download the “Exchange System Manager for Windows Vista”
  2. On the Windows 7 machine, go to Control Panel -> Programs and Features -> Turn Windows features on or off -> Expand Internet Information Services -> Expand Web Management Tools and then install all of the IIS 6 Management Compatibility tools.
  3. Open Command Prompt on the Windows 7 machine as an Administrator and navigate to where you stored ESMVISTA.msi.
  4. Run “ESMVISTA.msi /q”
  5. You should now be able to open up the properties on a user account through the ADUC and see your exchange tabs.

Deploying Server 2008 R2 Std via SCCM

I was asked to create a deployment for Server 2008 R2 today. I figured it would be easy as hell, however that wasn’t the case. The task sequence kept throwing an error on the “Setup Windows and ConfigMgr task. Ends up it was due to the product key. After messing around with the TS over and over again, I found that if I removed the product key the TS would finish successfully. I ended up finding out that the copy of Server 2008 R2 that I got off my companies licensing site doesn’t allow for a MAK key to be entered during setup. After some more searching online however I found a way to input the MAK key another way so that when the OS went to automatically activate itself it wouldn’t throw an error.

What you need to do is add a Run Command Line task to your TS that comes after the OS is already installed. Put in the command line “SLMGR.VBS -ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX” and then tell it to start in %system root%system32.

By doing that you’re specifying a product key to be used during automatic activation.

Change the logon screen picture in Windows 7

Here is how to change the logon screen picture in Windows 7.

  1. First you have to enable the ability in the registry. You need to create a dword called “OEMBackground” and give it a value of 00000001.
  2. Now you need to go to C:WindowsSystem32oobeinfobackgrounds. More than likely the directory won’t exist so you’ll need to create it yourself. In this directory you just need to put in a background picture you want to use. It must be named backgroundDefault.jpg and cannot be any larger than 256KB.

Reboot to see the results.


Change the default user profile picture in Windows 7

The following will get you to where every user by default has a custom profile picture.

  1. You first need to go to C:ProgramDataMicrosoftUser Account Pictures and rename user.bmp to user_old.bmp.
  2. Now copy your custom picture to that directory. Make sure that it’s a bmp, and it’s called user. You also need to make sure that it’s 128×128 pixels.
  3. Reboot the computer and the new picture will now be the default profile picture.
8/20/13 Update – I would recommend checking out the following post I made around this subject.

Modifying your primary OS partition

So here’s the scenario that got me into posting this. One of the sysadmins created a new virtual machine in VMWare by cloaning another. The original only had a 20GB drive, but he wanted it to be 40GB. He added the needed space, and then was going to use a partitioning tool to modify the OS partition. Well, he found out that VMWare didn’t like his partition tool and wouldn’t allow it to boot so at that point I pointed out that he could just use diskpart. Apparently he was under the assumption that diskpart wouldn’t allow him to mess with the primary partition… but he soon discovered otherwise. All you need to do to be able to use diskpart to manage your partitions outside of windows is do the following…

  1. Get a WinPE 2.0 disc, or a Windows Vista/7 disc
  2. On the WinPE disc, just get to command prompt, which should be super easy. On the Windows installation discs, you’ll need to select your language, click Install Now, then click SHIFT + F10.
  3. Once the command prompt is up, type diskpart. You’ll then see your prompt change from X:> to DISKPART>
  4. At this point if you don’t know what commands you need, you can go to the below link to read up on it.


Set file associations with a script

So I’m ashamed to be presenting a scripting technique that doesn’t use PowerShell… but I don’t have the time right now to find out how to do it in PowerShell.

I’ve come across the need to set PDF files to open using Adobe Reader instead of another program. After looking into it, I found that I can create a batch file and use the assoc command, like so.

@echo off
assoc .pdf=AcroExch.Document
Simple as that.