I am trying to create a bootable partition in Windows. I need to be able to do this from Windows XP through Windows 7. Ideally I would be able to do it both for FAT32 and NTFS depending on if the device is smaller than 32 GB (FAT32) or larger (NTFS).
On Vista and 7 I have a script that can do this using diskpart.exe, but this does not work on Windows XP because creating a partition is not exposed in diskpart.exe. The other problem with Windows XP diskpart is that usb thumb drives are not usually listed as drives (presumably because they're 'removable').
So my main need is, can I use DeviceIoControl or some other API to create a bootable partition, and have this method work from Windows XP to Windows 7? If I absolutely have to have different solutions for Pre-Vista and Vista+ that is ok.
Thank you.
Ben