Monday, December 31, 2007

Add Command Prompt to Shell Context Menu

The following Registry entries provide a new entry when right clicking on Directories in Windows Explorer. This new "Command Prompt" entry will open up a Windows command prompt with the right clicked folder as the current directory:

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\Command]@="Command Prompt"
[HKEY_CLASSES_ROOT\Directory\shell\Command\command]@="cmd.exe /k cd %1"

Change Windows Batch file "editor"

When you right click on a *.bat file in Windows, you have the option to "Edit" the file. You're out of luck, however, if you'd like to use your own editor since you can't find batch files listed in Folder Options.

Here's the registry key to modify to run your own text editor:
HKLM\Software\Classes\batfile\shell\edit\command

The default value normally contains a path reference to notepad.exe. I changed mine to run with SlickEdit by using the following entry:
%ProgramFiles%\SlickEdit\win\vs.exe %1

As soon as I saved this entry and right clicked a batch file, selected edit, and it popped up in SlickEdit.

Friday, October 19, 2007

Getting WPA-PEAP to run on Cisco LWAPP with Windows Wireless Zero Config

This sounds simple...Add another twist: Have machines authenticate rather than with user accounts, and manage the whole thing centrally for Windows-based clients. Add yet another hurdle: We need Group Policy to run at the computer level, which means the Group Policy needs to run from the domain even though the computer is wireless only.


Not all of this is yet solved, however the basic infrastructure is there. Here's how to get it to work from a high level:


1 - Have a fully operational Active Directory domain


2 - Install IAS on some member server or domain controller


3 - Install the SelfSSL utility from Microsoft's IIS 6.0 Resource Kit Tools on your IAS server


4 - Generate the Self-Signed Certificate on the IAS Server using the command line SelfSSL tool:
c:\Program Files\IIS Resources\SelfSSL\selfssl.exe /V:1895

This will create a self-signed certificate for the IAS server to use duing PEAP authentication. The certificate will be valid for 1895 days, or about 5 years.


5 - You now need to export the root certificate so that you can send out the root certificate for clients to trust your IAS server. Open up MMC.exe and add the Certificates Snap-In based on Computer Certificates for the local computer. Under Personal certificates, you'll see the certificate listed. Using the context menu, export the certificate to a file. Don't export the Private keys, and choose the .cer format.


5 - Get this certificate to be trusted by your Windows Clients. This is best done with Group Policy. It is safe to set this in a domain-wide policy, assuming you trust the server for which you are publishing the certificate. In Group Policy, navigate to:

Computer Settings -> Windows Settings -> Security Settings -> Public Key Policies -> Trusted Root Certification Authorities

Using the context menu, Import the root certificate you created in the previous step.


6 - Now use Group Policy to configure the Wireless Settings. This is best done using the GPMC on a Domain Controller running Windows 2003 SP1. You'll find the Wireless Settings at:

Computer Settings -> Windows Settings -> Security Settings -> Wireless Network (IEEE 802.11) Policies. Here you can setup a policy to configure the preferred networks, as well as the basic parameters for the wireless connection. Make sure to select the root certificate for your IAS server in the PEAP configuration page. Notice the options here are different than when using the Wireless Zero Config GUI. One thing in particular is that it allows you to use Computer authentication for domain computers:


Monday, June 18, 2007

SMS 2003 - Problems setting up with remote SQL Server

Been banging my head against this one all morning. We just installed SMS 2003 on a new Win 2003 SP1 box. Our SQL Server is sitting on a separate Win2k box. The SMS Server keeps complaining about the installation of the SQL Monitor. It complained in the Site Status -> Site Name -> Component Status -> SMS_SITE_COMPONENT_MANAGER logs with the following entry:

Could not read registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS" on computer ROCKYPT. The operating system reported error 997: Overlapped I/O operation is in progress.


Looks like 2003 SP1 won't work with Advanced Security setup see MS KB: http://support.microsoft.com/kb/906570 and http://support.microsoft.com/kb/906570/. After installing 2003 SP2 on the SMS Server, it was able to install the SQL Monitor just fine. Got a different error because SQL Server didn't publish its SPN, but I'll take care of that later...