timtim1234
Technical User
I have been searching and searching for a way to format a USB key in Windows XP from FAT32 to NTFS.
What I came up with was the DOS convert command, which errors out when attempting to use it and this bit of code:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colVolumes = objWMIService.ExecQuery _
("Select * from Win32_Volume Where Name = 'E:\\'")
For Each objVolume in colVolumes
errResult = objVolume.Format("NTFS", true)
objVolume.Label = "MyLabel"
Next
This returns a NULL value for objVolume, but works in Windows 7. Does anyone know - is there anything that works for creating a bootable USB key from Windows XP.
Any help is appreciated.
Thanks,
Tim
What I came up with was the DOS convert command, which errors out when attempting to use it and this bit of code:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colVolumes = objWMIService.ExecQuery _
("Select * from Win32_Volume Where Name = 'E:\\'")
For Each objVolume in colVolumes
errResult = objVolume.Format("NTFS", true)
objVolume.Label = "MyLabel"
Next
This returns a NULL value for objVolume, but works in Windows 7. Does anyone know - is there anything that works for creating a bootable USB key from Windows XP.
Any help is appreciated.
Thanks,
Tim