Updated scripts are here http://188.8.131.52/blog/?p=241
I have updated the script I posted sometime back. I have put some error checks to make sure that you don’t try to mount a VHD which is already mounted or in use. Also, this script will mount only the “real” VHDs. In the unmount context, I just have a check to if the unmount is successful or not. If not success, I am just returning a message to the user.
You can download the update script here
You can even use this script at the command prompt to mount or dismount VHD.
To mount, Cscript VHDMount.vbs mount vhdpath
To dismount, Cscript VHDmount.vbs dismount vhdpath