I tested the script. It's OK. The problem though is the following:
When both the system and destination disks are connected to internal IDE controller, everything works fine. The copy is successful, and I was able to start my computer with the destination disk, although these disks are not the same.
The situation is quite different when the destination disk is connected as an external USB drive. In this case, Windows fires a warning that the copy is failed due to disk lock and prompts me to Abort/Retry. When I select Retry, R-Drive Image copies the disks successfully, and I can start the computer from the destination disk.
So, I recommend you to run the script manually and see what is going on.