Install Windows Recovery Environment
30. September 2007 06:20

The Windows RE replaces the recovery console from XP, and is really a pretty slick environment.  The problem is, Microsoft didn't think we'd use it much, and it doesn't install automatically onto your machine.  Of course you can use it from the DVD, but I prefer to have it installed in my startup menu.

There is a great simple step-by step guide on installing it locally here:

http://www.svrops.com/svrops/articles/winvistare.htm

Which is based on a slightly more complicated post on the Windows RE blog.

You'll need a vista DVD, and to download the Windows AIK, which is linked in the article.

Tags: Comments (0) | Permalink
Vista Boot Error: SPTD.SYS Corrupt or missing
29. September 2007 07:53

Had an irritating experience last night when after rebooting, Vista informed me that it could not start due to a missing or corrupt 'c:\windows\system32\drivers\sptd.sys'

It took me a while to get this solved, so hopefully I can save someone else the trouble.

A few points:

  • This is most likely caused by Daemon tools, or Alcohol 120%, or some other virtual drive/ISO mounting tool.
  • Safe-Mode booting doesn't seem to help with this problem under Vista.
  • If you have a Vista cd, and can boot into recovery mode to fix this, by all means, give it a try.  Didn't work for me.

Basic goal for fixing this problem is removing, or renaming, the problematic sptd.sys file.

To do this, we'll use a ubuntu live CD, and install ntfs-3g support to write to our NTFS partition.

Make yourself a Ubuntu Linux LiveCD, which you can download an ISO for here:

http://www.ubuntu.com/getubuntu

Plug your victim machine into a LAN cable, we need internet access and we don't want to mess with wireless.

Drop the CD into your victim machine, and choose to boot into Ubuntu.  We won't install ubuntu, just use the liveCD environment to delete our file.

If Ubuntu makes it into the graphical environment, great.  If not, don't worry, everything here will be done from a terminal, so you can launch one from the GUI, or just use the console.

Lets get into Admin mode.

> sudo su

And edit our apt sources to include the repository containing NTFS drivers

> nano /etc/apt/sources.list

You'll see two lines in there with # comments in front of them, for a deb and deb-src, to the universe repository.  Remove the # comment from the deb line, so we include the universe repository.

Press control+x to exit, and confirm to save.

Then lets update the package lists.

> apt-get update

And install ntfs drivers

> apt-get install ntfs-3g

(choose yes to any prompts)

Now here we will be assuming your drive is /dev/sda1, if you have more than one drive, it may be sda2, or hda1, etc.

Lets make sure it's not mounted already.

> umount /dev/sda1

And lets mount it with the ntfs-3g driver, in read-write mode.   This will mount it up into the media directory.  You can mkdir a new folder in there if you prefer first.

> mount -t ntfs-3g /dev/sda1 /media -o force

Lets navigate to our drive

> cd /media/Windows/System32/drivers

And get rid of the file by moving it to another directory

> mkdir old_driver

> mv sptd.sys /olddriver

Now lets shutdown, and you should be able to boot vista.

> shutdown now

Good luck!

Tags: Comments (10) | Permalink
Error 1: The path specified cannot be used at this time. HRESULT: 0x80070094
17. September 2007 08:11

When installing Performance Point Server CTP4, I kept getting this error towards the end of the configuration process.

It seems it is a failure in creating a web application, and it's relatively easy to get past.

Do an IISReset

Restart the "Windows SharePoint Services Timer" windows service.

Browse back to the PPS configuration manager, which should have already been installed into your start menu, and try again.

Tags: Comments (0) | Permalink
Multiple Selection Dropdown for ASP.net 2.0
9. September 2007 16:04

** Updated, October 4th 2007 -- See bottom for change list

It seems there is a large void out there for simple asp controls which provide multi-select combo box functionality.

As no control exists within the framework (or web standards), we have to create our own, through a combination of javascript and CSS.

I spent quite a while searching, and couldn't find anything free that worked well, (or even any good looking non-free controls) so I created my own.

I've created a custom web control, derived from a combobox, which supports databinding, and can easily be dropped onto your page in place of a normal drop down box. The main difference being that mine has checkboxes next to each list item, and returns the text value as a delimited list of selected items.

The screen shot is taken from IE7 in Vista, and the page is being rendered in Quirks mode (Transitional actually, the asp2.0 default)

There are some irritating hurdles to overcome matching the look between quirks and strict mode rendering, as of now, the best solution I have is a design-time boolean property to choose, I'll implement this in the coming days.

Here's a shot in design view, showing databinding support:

Status:

Currently IE6 and IE7 render properly in quirks mode.

Firefox renders properly, but the javascript has fewer features currently.

How do I get it?

Well, first, you have to remember that this is an early proof-of-concept design, and all the nice features will be ready later! With that in mind:

Grab the binary - All the scripts/image are embedded resources.

Grab the VS2005 project with sample - Excuse the mess of code for a few more weeks!

Please comment here if you find this useful, or make any enhancements, and let me know what you see missing! I'll be flushing out the more obvious features in the coming weeks, such as more theming support, better firefox support, etc.

If you'd like to use this for any corporate/commercial purposes, get in touch with me first!

Known Issues:

  • No property to change delimiter
  • Fixed border styling doesn't match default vista rendering of text boxes
  • Can't change drop down image

_____________________

New Version!  (links above are up-to-date)

Updated October 5th, 2007

  • Ability to set maximum height of drop down box.  Anything past this height is displayed via scrolling.  This determines how many check boxes are shown before scrolling is enabled.  Use the MaxDropDownHeight property.
  • Code cleaned up slightly, with some comments added.

Updated September 17th, 2007

  • Enable AutoPostBack works.  You can catch the selected-index-changed event.  Your not actually catching a new selected index, but you can get the new text value in the event.  This works even if you have several instances of the control on your page.
  • Added public property:  "TransitionalMode".  If enabled, the control renders properly in XHTML Transitional Doctype, (standard), if disabled, it renders properly in quirks mode.  Basically, if it seems to be rendering wrong, change this property.
  • Added scrollbars to drop-down pane if too many options are present.

Grab the binary

Grab the VS2005 project with sample

Tags: Comments (81) | Permalink
Send email from your MOSS Web Part
5. September 2007 06:54

It's easy to leverage the email server SharePoint is configured with already. This is the mail server used for alerts and notifications within the portal system.

You'll need to add a reference to the Microsoft.SharePoint.Utilities namespace.

using Microsoft.SharePoint.Utilities;

Then just use the SendEmail method:

SPUtility.SendEmail(SPContext.Current.Web, false, false, "to address", "subject line", "body");

Tags: Comments (6) | Permalink