Re: convert FAT32 to NTFS problem?




"roopeman" <roopeman@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4E99148D-059A-469E-9563-44DA62996A80@xxxxxxxxxxxxxxxx
> this is my last version, anybody can check it for me ? thanks !


It's a good thing (bad thing?) that VBScript is case insensitive.


This line has a typo:
sDiskLetter = obiLogicalDisk.DiskID


Change *both* instances of this line:
objWMIservice.Create("cmd.exe /c convert.exe"&sDiskLetter&":/fs:ntfs")

to this:
sCommandLine = "cmd.exe /c convert.exe " & sDiskLetter & " /fs:ntfs"
WScript.Echo "DEBUG: " & sCommandLine
objWMIservice2.Create(sCommandLine)


You have two variables with very similar names (objWMIservice and
objWMIservice2). You should choose more descriptive names so you can determine
what they are used for.



.