Actually yes, as he hard coded it so if Windows was installed on any other drive it would have failed.
There is no default Environment Var with the base folder.

Using a remote registry read and then parsing through the folders would have probably been the best solutions as it could / would work both locally and remotely for an Administrator.