Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting USB key to NTFS from Windows XP

Status
Not open for further replies.

timtim1234

Technical User
May 22, 2014
7
CA
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top