Create a custom Expiration action

Excellent work from Ton Stegeman – Adding a custom action to the MOSS expiration policy. Also, MOSS Custom policies parts One, Two and Three. I was particularly interested in Part 2, ‘cos it is programmatically submitting an item to the Records Repository (via a web service. I guess that’s okay, but I was surprised that this didn’t appear to be in the Object Model. Or maybe it is and I just can’t find it!)

Create a custom Expiration action

Creating Site Templates

Note that Site Templates aren’t the same as Site Definitions. Good article about how to do this here. Or read Creating a Custom SharePoint 2007 Portal Site Definition using the PortalProvisioningProvider Class for ‘portals’ (I agree – that’s the most over-used word in SharePoint, along with confuse over what a ‘site’ is (sometimes a collection, sometimes just a site…)).

It’s worth considering the differences between (more here). Some of the differences demystified (note – about Beta 2). Info on how to create a custom site definition (hint – copy an existing one – bit more here). And information on which existing templates are right for me.

Creating Site Templates

Extending VM discs – notes for myself

  1. Shutdown your VM.
  2. Make a copy of the latest state (or the one you want to extend the disc for). You can’t keep snapshots across extending the disc.
  3. Open command prompt, and go to “c:program filesvmwarevmware workstation”
  4. Run the command vmware-vdiskmanager -x 10GB -t 1 “path_to_VMDK_file” . This will extend the virtual hard disc at the path defined to be a 10GB disc, stored as growable 2GB files.
  5. Start the VM. Go to Disk Management, and you’ll see a bigger disk, now with a large unallocated space. You need to extend the partition into that space.
  6. If it isn’t installed already, install DiskPart (which can be downloaded from Microsoft). This is a Microsoft tool, and is built into Windows 2003 Server. However, it works on 2000 and XP too.
  7. Open a command line, and run DISKPART
  8. Type list volume
  9. From the list, identify the volume you want to extend (2 in my case)
  10. Type select volume 2, where 2 is your volume from 9) above.
  11. Type extend.
  12. Job done.

Based on some instructions from here, but I think mine are simpler…

Extending VM discs – notes for myself

The Pain of VB6

So, I’ve been forced to spend a couple of weeks modifying some code I wrote a couple of years back, in VB6. One word – crap. That’s the word for both the language, and my code.

Visual Basic 6 is just painful to code with. ‘Dim’? I’d say. The inability to return arrays from a function keeps catching me out. And I detest the way that no matter what I do, I can’t stop Visual Studio beeping errors at me and show message boxes when I try to leave an incomplete line so that I can copy and paste a variable name.

The worst part is, though, that it doesn’t really promote good program structure – well, not to me anyway. I’m often not entirely convinced that Object Oriented Programming actually reuses much code – but it does force it to be structured and organised. My code in this project, well, it isn’t. It’s suffered that sort of ‘evolutionary’ growth rather than proper, designed expansion. And some of it has to excapsulate an API that is archaic, irritating, and dangerous. (I’ve been debugging for memory leaks, dammit. Yes, this API forces me to allocate/deallocate memory).

What a sucky language. It really makes you appreciate Java/C#.

The Pain of VB6