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.
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.
Here’s a quick registry import to.
Windows Registry Editor Version 5.00
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.
Here is how to change the logon screen picture in Windows 7.
- 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.
- 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.
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…
- Get a WinPE 2.0 disc, or a Windows Vista/7 disc
- 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.
- Once the command prompt is up, type diskpart. You’ll then see your prompt change from X:> to DISKPART>
- At this point if you don’t know what commands you need, you can go to the below link to read up on it.
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 offassoc .pdf=AcroExch.Document