Well, I may be wrong (I'm not going to whip out the manual right now) , but I think the drive has to be MAPPED first. Don't think you can do a GETDISKSPACE against a UNC which is what the code is trying to do it looks like.

Map the drive to a valid letter first, then check the space. However, you will find that it is NOT the users space you will see, but the entire volume which is shared with other users or folders. KiXtart has no built in tools that I'm aware of to check that {quickly}. You can probably put together a script from UDFs that will add up all the files (in fact Howard Bullock) has DirHog on his website that could be used in a script to derive that information.