Monday, November 27, 2006

Powershell RTM is Hot.

I'll post more PowerShell scripts in the future, but the basic idea here is that PowerShell is awsome. Makes AD and Exchange managment cake. Can't wait to see what SMS 4.0 does with it. As an added bonus, you can now lord your Object Orientated Shell over the heads of those pesy 'Linux' people and their 'Bash'.

RTM is out here:

Monday, July 24, 2006

Logon Script to Set Windows Default Log on To Domain

Simple little Visual Basic script today. It writes the registry key to specify which Domain Windows will choose for displaying in the GINA Log On To drop down box. It allows you to specify two different choices, a primary and an alternate, but you can always comment out the alternate if you wish.

' NAME: setLogonTo.vbs
' AUTHOR: Charles Wastell
' DATE : 7/24/2006
' Updates
' 7/24/06 - Initial Revision
' COMMENT: Changes the default Logon To at the Gina login box to the default domain.
' You can comment out lines 27 and 43 if you only have one domain to logon to.
' **********************************************************************************
' Variable Declarations
' **********************************************************************************

Dim defaultDomain, defaultAltDomain
Dim WshShell

' **********************************************************************************
' User Customizable Section
' **********************************************************************************

defaultDomain = "YOURDOMAIN"

' **********************************************************************************
' Variable Initialization
' **********************************************************************************

Set WshShell = CreateObject("Wscript.Shell")

' **********************************************************************************
' Write Reg Keys
' **********************************************************************************

On Error Resume Next

WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultDomainName", defaultDomain ,"REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AltDefaultDomainName", defaultAltDomain , "REG_SZ"


Thursday, July 20, 2006

Windows Command Line CDP Capture Utility

Cisco Discovery Packets (CDP) will give you a lot of valuable information if you can capture them: they will give you your IP, the switch your on, and the port on that switch you're connected to. When combined with a database that maps switch ports to datajack, you can directly locate where a computer is on your network.

The only problem is that capturing this little buggers is tough in Windows: CDPR will do it, as will Ethereal, but both require WinPcap to be installed. Luckily I found version of TCPDump for Windows thats built on the WinPCap SDK; this means the little 400k utility can capture CDP packets on a machine without any additional tools. You can get it from micoOLAP here. The manual page for WinDump (version of TCPDump that needs WinPCap ) can be found over here.

The final step is getting TCPDUMP to capture the CDP Packet. Command line we're using it "tcpdump -nn -v -s 1500 -c 1 ether[20:2] == 0x2000" (from another blog). It takes up to 60 seconds (depending on switch settings), but eventually pulls down the CDP Packet. I'll see if I can't wrangle up some VBS Login scripts to run it in a bit.


Wednesday, July 12, 2006

Brother MFC-8440 Multifunction Windows Server 2003 Fax, Print, and Scanner Drivers

Brother International does not support their line of multifunction printers in Windows Server 2003. Well, they do support the print functions, but if you want to use the Fax or Scanner functions you are SOL. I would guess it has something to do with them offering a nice network fax and scanner driver as an optional but expensive accessory, but I digress. I wanted to share the Fax Machine off our Brother MFC-8440 printer with the rest of our IT Department, but being that it wouldn't work with 2k3, and XP doesn't allow you to share faxes.

So what I did was methodically combine the Windows XP Drivers with the Windows Server 2003 Drivers so that I was using the most up to date file versions, then edited the associated INF files so that it would install. After some tweaking and some wall to head interaction, it's working great and we can fax from any of the computers in our office using the wonderful Microsoft Fax Services. The driver files are available here:

While editing the drivers, I think I have made the correct changes so that it will work with Vista, but I am unable to check as I don't have any Vista boxes laying around. Also be aware that these drivers, while tested on my systems here, come with no guarantee that they won't hose up your system and come with no warranty what so ever.


Wednesday, July 05, 2006

Override Adobe Creative Suite 2 Minimum Requirements

Adobe Creative Suite 2 checks the system that you are installing it on in order to see if it meets the minimum requirements for running it. Of course it will run on systems that don't meet the minimum requirements, just not well. By default it wants at least 384 megs of RAM, 1024x768 screen resolution, and 1.5 GB of hard drive space: if you system doesn't meet these requirements it won't install, giving you some cryptic message about getting a better computer.We ran into issues where users "needed" to upgrade to CS2 from CS to resolve version errors between them and other departments.

To get CS2 to install we had to "edit" the requirements so that it would install on their machines. The process is to do this is relatively simple: copy the contents of CD1 to a directory on your PC. Open up the setup.ini file in the root directory in your favorite text editor. Under [Requirements] there are a list of 5 different types of checks that the setup file will do: RAM, Administrative Rights, OS, Screen Resolution and Hard Drive space. Simply edit the various values to a point sufficiently low enough for your computer. Our [Requirements] section is setup to allow installs on machines with 100 megs of RAM, 640x480x16bit screen resolution, and 1.5 GB of space on the drive. A copy of our requirement section is below. Once you have made the changes, simply save the ini file and burn the contents back to a CD. You can now use this to install off of rather then the original disk.

Requirement1MsgFailure="$$$/ACS/ReqCheckFailureRam=The Adobe Creative Suite 2 needs at least 384 MB of RAM\ninstalled in your computer in order to run properly. Adding even more\nRAM will increase performance. Please add more RAM to your\ncomputer and then restart the installer.\n\nThe minimum system requirements for the Adobe Creative Suite are:\n\t- Windows 2000, XP\n\t- Pentium III processor or better\n\t- 3 GB of hard disk space\n\t- 384 MB of RAM\n\t- 1024x768, 16-bit color monitor"

Requirement2MsgFailure="$$$/ACS/ReqCheckAdminFailure=Administrative privileges are required to install the Adobe Creative Suite 2.\n\nPlease quit the installer, log in as an administrator, and run the installer\nagain to continue installation."

Requirement3MsgFailure="$$$/ACS/ReqCheckFailureOS=The Adobe Creative Suite 2 requires that at least Windows 2000\nor Windows XP be installed in order to run properly. Please upgrade\nyour operating system and then restart the installer.\n\nThe minimum system requirements for the Adobe Creative Suite are:\n\t- Windows 2000,XP\n\t- Pentium III Processor or better\n\t- 3 GB of hard disk space\n\t- 384 MB of RAM\n\t- 1024x768, 16-bit color monitor"

Requirement4MsgFailure="$$$/ACS/ReqCheckFailureScreen=The Adobe Creative Suite 2 needs your monitor to support a\nresolution of at least 1024x768 with 16-bit color in order to run\nproperly. Please connect a compatible display device to your computer\nand then restart the installer.\n\nThe minimum system requirements for the Adobe Creative Suite are:\n\t- Windows 2000,XP\n\t- Pentium III Processor or better\n\t- 3 GB of hard disk space\n\t- 384 MB of RAM\n\t- 1024x768, 16-bit color monitor"

Requirement5MsgFailure="$$$/ACS/ReqCheckFailureMinFreeSpace=1.5 GB of space must exist on your startup disk to start installation\nof the Adobe Creative Suite 2. Please delete unneeded files to free\nup additional disk space and then restart the installer.\n\nThe minimum system requirements for the Adobe Creative Suite are:\n\t- Windows 2000,XP\n\t- Pentium III Processor or better\n\t- 3 GB of hard disk space\n\t- 384 MB of RAM\n\t- 1024x768, 16-bit color monitor"

Monday, July 03, 2006

RIS Welcome.OSC Featuring Vi Clippy (aka Vigor)

Everyone loves Clippy. And where better to have Clippy then on the Welcome screen for Remote Installation Services? With that in mind, below is the source code for using Vi Clippy in your Welcome.OSC file on your RIS server (it's under \RemoteInstall\OSChooser\ ). The Welcome.OSC template used to build Vi Clippy was from Server 2k3 SP1, but it should work on any RIS server.
Screen shot:

Download it here

Friday, June 30, 2006

Outlook 2003 SP2 Hotfixes Breaks the Lotus Notes Domino Connector

We're still running Domino Server 6.5 and using Notes R5 client on our domain for political reasons. Given how wonderful Notes is, the IT Office staff uses Outlook 2003 with the Lotus Notes Data Connector (available from MS for free). It works great, and means we don't have to use Lotus Notes in the office.

Recently we found that users who were setting up new Outlook Profiles using the Notes Connector were having issues with Outlook spitting out a "Unable to open your default email folders. The server is not available. Contact your administrator if this condition persists." error when the user tried to use their new Outlook profile. Looking at the Outlook log files it was showing "Error in CABProvider::QueryInterface failed, E_NOINTERFACE (0x80004002)". The odd thing was that anyone who had an Outlook profile that had already been setup and used for awhile was not having this issue, even on the same machine.

So after doing some research it turns out that some of the latest hot fixes for Office 2003 SP2 break the Notes Connector (only the olconn2.exe , which hasn't been updated since 2004). Specifically they are KB916521 , KB892843, and KB913807. There may be a couple of other roll-up hotfixes that break it, but these are the latest once I could track down. The kicker is that you can't just remove these hotfixes, you actually have to uninstall Office 2003 SP2 and the Notes Connector. You then have to reinstall both, making sure to disable Office Update from installing these hotfixes until after you have created the profile. Strangely, the older Notes Connector (olconn.exe) has been recently updated on 5/9/2006 and apparently works with all of the latest hotfixes (albeit only for Outlook 2002).