Mounting ISO files from the command-line

Monday, 1 October 2007

With some recent birthdays, we've acquired some computer games for the kids to play.

The titles include:

Even though these games are quite engaging and the kids really seem to like them, it's amazing at how clumsy some of these applications are to get installed in a 'safe' way.

I install them myself, and then set up shortcuts so that the kids can log in using their username. I am an admin on our home pc, but the other accounts are just regular users.

The games expect to run as Administrator (eg. the "Arthur" titles try and write the saved games back to the Program File installed directory (instead of in the user's profile). As a consequence, I had to fire up cacls.exe to grant Everyone permission to write to this folder.

They also seem to assume you have a VGA monitor - when they try and change the resolution it doesn't always look that good on a LCD display.

They also often require the CD to be in the CD-ROM drive. I find this particularly annoying. The installation should allow me to install everything from the drive onto the hard disk so you don't need to be swapping CD's.

I'm trying to work around this by generating an ISO image of the CD using ISO Recorder, and then mounting and unmounting the image when you want to run the game.

I found FileDisk - a Windows driver and command-line tool to mount and unmount ISO files. I then created a small batch file that I thought should do the job:

@echo off

REM mount cd
"C:\bin\filedisk.exe" /mount 1 "c:\Install\ISO\ArthurWildernessRescue.iso" /cd e:

cd "C:\Program Files\The Learning Company\Arthur's Wilderness Rescue\Launcher"

REM run
"C:\Program Files\The Learning Company\Arthur's Wilderness Rescue\Launcher\TLCLauncher.exe"

REM unmount
"C:\bin\filedisk.exe" /umount e:

I then tried this out with one of the non-admin logins, but sadly it fails with an "access denied" error. It appears that filedisk is using one of the Win32 API calls assuming the current user is an Administrator too.

Filedisk does include source code, so it might be possible to fix this, but I'm guessing it might take a bit of time to figure it out.

Taking "Arthur's Wilderness Rescue" as an example, I looked closer at what files it had left on the CD, and it didn't appear to be many at all!

I located a file "salstartup.xml" and noticed that it was pointing to a file on the CD, so I copied this file onto the hard disk and updated the XML file and it appears that it all works now without the CD being in the drive.

DisplayFusion

Tuesday, 25 September 2007

If you like the multi-monitor desktop wallpaper support provided by UltraMon but can't afford USD39.95, you could either write your own, or you could check out Binary Fortress Software's DisplayFusion.

I trialled UltraMon for 30 days, and I really like the extended task bar that they provide too.

Marking deleted rows in a database table

Monday, 24 September 2007

In one of our applications, there is a requirement that data not be permanently deleted (or at least not initially).

The original way I implemented this was to add a DELETED bit column to each table, and if that column was set to 1 (true), then I would treat that row as if it didn't exist.

This is achieved through ensuring access is via a View that excluded those rows, stored procedures, and also adding an INSTEAD OF DELETE trigger that intercepted regular DELETEs and converted them into UPDATEs to flip the column bit.

That works pretty well, but I'm trying to weigh it up against the other approach I can think of, which is to have a separate table that only holds the deleted rows.

eg. if the original table was FRED, then the other table could be named DELETED_FRED (just to be clear what it was for!).

I'd guess you could still use a trigger to catch any deletes to table FRED, and use them to copy the deleted row over to DELETED_FRED.

I suspect that the latter approach probably makes it easier to use some kind of ORM framework, as you don't have to be careful about avoiding the deleted rows.

The advantage of the former though is that you maintain your referential integrity for all of your data. Because of the relationships of other tables besides FRED, I don't think I could do this with the DELETED_* tables.

I'm curious as to what other pros and cons are of these approaches, and whether there is a formal name for this kind of thing?

There are some resources I have found:

Installing Roxio Creator Plus on Vista

Thursday, 20 September 2007

Up until yesterday, I've resisted installing the OEM version of Roxio that came bundled with my Dell Optiplex GX620 workstation, as I found the combination of the inbuilt CD/DVD burning along with ISO Recorder handled all my requirements.

I was putting together a backup of my Documents and latest PST file, and there must be something funny about the files, but both the latter solutions croaked on them.

The problem with installing Roxio is that the installer blows up with an error saying you must be an administrator to install the product.

In desperation, I followed these steps to enable the builtin Administrator account (it is disabled by default on a clean install of Vista). I did have to update the local policy too.

I then logged in as the Administrator account (using runas didn't work), and the install proceeded happily.

The Roxio media has a date of 2005, and the "About this Software" dialog lists the following versions:

Module Name: Roxio Creator Plus - Dell Edition
Build: 2.4.32a
Serial Number: SC-204B28D
Copyright: Sonic Solutions 2005

Module Name: PX Engine
Build: 2.2.54a, 68
Copyright: Sonic Solutions 2004

Module Name: Roxio RecordNow Audio
Version: 2.0.4
Build: 204B28C, RCP
Serial Number: CQDKR2PD6YT5KBYHS
Copyright: Sonic Solutions 2004

Module Name: Home
Copyright: Sonic Solutions 2004

Module Name: Roxio RecordNow Data
Version: 2.0.4
Build: 204B37C, RCP
Serial Number: CEEWK9329SNNFA84H
Copyright: Sonic Solutions 2004

Module Name: Launch Backup
Build: 204B37C, RCP
Copyright: Sonic Solutions 2004

Module Name: Roxio RecordNow Copy
Version: 2.0.4
Build: 204B28D, RCP
Serial Number: CUY8FVJQ32XQJBRJB
Copyright: Sonic Solutions 2004

Even though it is a few years old, the good news is that it was able to burn the files successfully.

I also tried running the "Check for Updates.." option, but either there are no updates or the updater can't find it's way through our proxy here at work.

Replacement iPAQ

Thursday, 20 September 2007

As I mentioned previously, my iPAQ has been sent off to get its audio fixed.

P9200060I thought I might borrow this from my daughter as a temporary replacement.

It doesn't have any telephony functionality, but you can write notes on it, and most importantly play a version of "Pop the Balloons" (aka the Balloon Breaker game).

Battery life is very good too :-)