[togo] don't apply the 'set internal disks offline' policy

* This creates issue due to dism incompatibilities between Windows versions
  and some users are puzzled why they don't see their internal disks.
* Also make the bcdboot call more robust by using the system one if the USB one fails
* Also fix small issues in RunCommand() and MountVolume()
This commit is contained in:
Pete Batard 2015-06-24 20:00:20 +01:00
parent a9ee79bdad
commit cc6234296d
4 changed files with 45 additions and 19 deletions

View file

@ -842,6 +842,9 @@ BOOL MountVolume(char* drive_name, char *drive_guid)
char mounted_letter[16] = {0};
DWORD size;
if (drive_name[0] == '?')
return FALSE;
// For fixed disks, Windows may already have remounted the volume, but with a different letter
// than the one we want. If that's the case, we need to unmount first.
if ( (GetVolumePathNamesForVolumeNameA(drive_guid, mounted_letter, sizeof(mounted_letter), &size))