Mac-style presentation effects on Windows

I wanted to create a video of a technical architecture presentation. It was created in Visio, but I really wanted to capture Mac-style mouse motions and spotlight effects as I narrated.

After a number of blind allies around mouse display software, I happened upon Impressive, an open source program that runs against PDF files.

Upon reading the Technology paragraph, which mentioned Python, GhostScript and OpenGL, I assumed that I would pay a brief visit to the downloads page, read some phrase about compiling from the C source code, and then move on. How wrong was I? You download the Windows package, unzip it, and you’re good!

Impressive runs from PDF files, so you need to convert your Visio or PowerPoint slide into PDF before you can launch it. Then, you either launch it from from the command line, or create yourself a Windows Shortcut to impressive.exe, and place it in the C:\Documents and Settings\[USERNAME]\SendTo folder. Then you can right mouse click on the PDF file and choose ‘Send To > Impressive’ to start the show.

(I won’t go into the features too much here, but suffice it to say I got the spotlight and highlighting effects I wanted, and my video turned out a treat.)

There are a host of features you can turn on and off if you want to use the command line to achieve finer-grain control over Impressive’s features. In my own case, I knew I wanted to produce a HDV 1080i frame size, and I was able to achieve this with the following command line:

C:\Apps\Impressive\impressive.exe -g 1440x1080 -f "MySlides.pdf"

And the best thing? Impressive is (effectively) a portable application, so you can use it in a locked down environment.

Simply Mail Solutions MS Exchange Classic Review

I recently decided to bite the bullet and migrate domain email for my two main employees to a hosted Exchange provider, so that we could get proper BlackBerry integration, rather than relying on forwarding our domain email to Hotmail (which actually works pretty well, but our clients could see the Hotmail address, which wasn’t very professional).

I rang around various local providers, and the market rate seemed to be around 25 GBP per mailbox PCM, plus 100-200 GBP setup fee. This hardly felt like a bargain, but there wasn’t much variation in the quotes, so I was about to plump for one of these providers when Google took me to Simply Mail Solutions.

I called the main number, and the lady explained that the price I had been quoted was for pre-Exchange 2010, and that things had actually moved on from a technical point of view. Blackberry and Microsoft had now spoken to each other, and there was a kind of halfway house which meant you could get BlackBerry Enterprise Server functionality without actually needing the full system. And the cost: 6 GBP PCM per mailbox!

So sold on price. But there were a number of technical hurdles which I threw up in the way, which were surely to test the patience of any support operation:
1. Could I only forward certain domain mailboxes to SMS, and retain control of MX records for the domain?
2. Could I get this working on a Mac?
3. Could I get the Blackberry Enterprise Activation app to work on my colleague’s older BlackBerry?

To cut a long story short, the answer to all of these questions was ‘yes.’ I must have raised five support calls during the migration, and the response from support was always quick, friendly and comprehensive. Finally, did I mention that SMS also include an OEM version of Outlook 2010 and 2011 in the price?

Conclusion

So, great price, and excellent service from these guys. Heartily recommended!

5 things they don’t tell you about upgrading your Mac

It’s always roses, roses, roses with my Mac-loving friends. But for some reason I don’t have the knack, and would like to remind myself of the following facts when I am next planning an upgrade.

1. Upgrading the OS or hard drive on your Mac *will* take you all weekend
2. You *will* try three different back-up methods before finding one that works
3. You *will* have to reformat one of your NTFS USB drives to Mac format so that your Mac can write to it
4. You *will* find that although the OS upgrade media is beautifully packaged, and designed by Apple in California, it will not actually work, and will require baroque instructions to save to disk followed by boot from new partition
5. Your jaw *will* drop when your Mac-loving friends blithely accept that they need to buy a new laptop / memory system / hard drive just to get a point release in OS

Reckon I’m happy to get back to my decade-old XP OS, that I can still install any software I’ve purchase in the last decade on.

Regenerating DBML Designer when your database changes

Here’s how to regenerate your DBML code in Visual Studio 2010 when one of your database objects changes:
1. Remove the table
2. Close the DBML designer and save
3. Re-open the DBML designer
4. Re-add the object by dragging from Server Explorer
5. Close the DBML designer and save

In finding this solution, I did find some wailing and gnashing of teeth on-line, with people expecting the DBML code to have some kind of refresh feature for automatically doing this when the database changed.

I must admit I don’t share their chagrin. I am:
* Pathetically grateful for anything that saves me not having to write a hundred lines of property let/get statements
* Impressed by the way projects that reference these objects automatically re-test for compilation as soon as you save the DBML code

Windows Batch File Current Date Formatting

Often you will create a windows batch file that runs on a periodic basis, and ideally you’d like it to reflect the current date when it does things like create files and folders.

I’ve seen some fairly arcane methods of retrieving and storing this information in variables through the years, but I think I’ve just found the most elegant solution.

To store today’s date in a variable with format yyyymmdd:
SET VAR=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%

That’s it! This is pretty hard to find online. It seems to be usually part of the more complete expositions on variable expansion, and is described as String Substitutions or Substrings. Obviously you can change the offsets above to change your format, and also note the character position pointer is zero-based.

Fix SQL Server Express memory growth

Here’s a simple batch script to restart SQL Server Express – I find memory used grows to at least 300 MB over time, although I do tend to leave Management Studio open for a lot of that period.

REM Simple batch script to restart SQL Express
REM BRD: 20110928
REM http://www.brdalby.co.uk/
net stop MSSQL$SQLEXPRESS
net start MSSQL$SQLEXPRESS
pause

Recovering Visual SourceSafe (VSS) Admin Password

We were given a legacy VSS repository, with passwords unknown. It turns out that not42 have created a very nice utility which wraps the hacking you have to do on um.dat to reset admin password to blank.

You can retrieve it right here:
http://not42.com/2005/06/16/visual-source-safe-admin-password-reset/

Verified as working for me with Visual SourceSafe 6.0d (Build 9848), running XP Professional SP3.

Matching in a comma-separated list with Regular Expressions

Tonight’s quiz:
How to see if ‘foo’ is a unique entry in comma-separated list ‘foo,bar,foobar,foo,foo’?

We want to match the ‘foo’ at the beginning, at the end, and also in the middle, but not as part of the word ‘foobar.’ Also the comma-separated list might only be ‘foo’.

First attempt:
[^,]foo[$,]

Plain wrong, because ^ means something different inside a set

Second attempt:
^foo$|^foo,|,foo,|,foo$

Works, but clunky.

Third attempt:
bfoob

Works perfectly. Especially when you remember to escape the ” in your .NET string assignment :(

Thanks to the Rad Software Regular Expression Designer too!

Visual Studio Stops Recognising Mouse Input

The shine is starting to wear off Visual Studio 2010 Professional for me. Recently the IDE has started to hang, in a rather strange way. The code editor still appears to respond to mouse events, but nothing actually happens. E.g. you can highlight some code, right mouse click and choose copy from the context menu, but then when you come to paste, nothing happens. Or you’ve been coding away, and you see the file name has an asterisk against it, so you hit ‘Control+S’ to save, but nothing happens. And the only way you can save your changes is by closing the file – at this point VS prompts you if you want to save.

This seems to be something that others have noticed, certainly in the Beta:
http://connect.microsoft.com/VisualStudio/feedback/details/504538/debugger-hangs-vs-for-a-long-time-when-coming-out-of-debug-mode

One of the tips is to uncheck the ‘Enable the Visual Studio hosting process’ checkbox in Project Properties > Debug pane – and this seems to have fixed it for me.

This is not very impressive. I’ve used all of the previous .NET editions of Visual Studio, and never seen this kind of stuff before.

Parser Error Message: Could not load type

Have been wrestling with the ‘Parser Error Message: Could not load type’ error for the past day and a half.

Plenty of people on Google having the same problem – it turns out my version of this problem was caused by a rather subtle mistake.

The directory structure in my web site is as follows:
root
----dir1
--------app_directory

I had duly configured app_directory to be an Application Virtual Folder in IIS, and was getting the Parser error every time I opened the following URL:

http://www.mysite.com/dir1/app_directory/mypage.aspx

Before I got as far as the Parser Error Message, I was getting another message:

“It is an error to use a section registered as allowDefinition=’MachineToApplication’ beyond application level” – this error message pointed to the line:
<authentication mode=”none”>

I got round this error by removing the node from web.config – but really this was pointing to the solution.

The URL I should have been accessing was:
http://www.mysite.com/app_directory/mypage.aspx

I had gotten confused between the physical location of the folder on the server, and the path in the URL. Because the ‘dir1′ folder actually existed, IIS was still able to serve up the URL, including any test HTML pages I placed in the directory, but it did not consider it to be the Virtual Application Folder, and thus I was unknowingly breaking all sorts of rules.

Not sure what I could have done to spot this earlier – and I guess I take back what I was saying about Microsoft at midnight last night. Or some of it, anyway.