If your device exists in the DB with a full inventory record then it should be built with its correct name. Below is a screenshot of one of my miniscans from provisioning and you can see there is no entry for Device Name. In this case the ldHostname variable will be filled in with a blank which windows 7/8 will then choose a random name like you are seeing.
Can you confirm if your devices have a full inventory record or just the miniscan entry?