Ok, this seems so simple yet the solution escapes me. I need to be able to format a USB drive prior to writing data to it to make sure it is the right file structure. If I use this line in the command prompt, it always asks me to press enter to continue; FORMAT F: /V:VOL /FS:FAT32 /Q
I have found excellent ideas in the FAQ's to run this line so it is not visible to VFP or the user but, it doesn't seem to work. I suspect it is because of the press enter prompt.
This is what I am using to run a line from the command prompt:
FUNCTION winexecrun
PARAMETER cCommand
DECLARE INTEGER WinExec IN win32api ;
STRING command, INTEGER param
retval = WinExec(SYS(2004) + "FOXRUN.PIF /C " + cCommand, 0)
CLEAR DLLS WinExec
RETURN retval
This is how I am calling it:
cCommand = "FORMAT F: /V:VOL /FS:FAT32 /X"
?winexecrun(cCommand)
The function works with other command lines like in the FAQ.
Any suggestions?
Ed
I have found excellent ideas in the FAQ's to run this line so it is not visible to VFP or the user but, it doesn't seem to work. I suspect it is because of the press enter prompt.
This is what I am using to run a line from the command prompt:
FUNCTION winexecrun
PARAMETER cCommand
DECLARE INTEGER WinExec IN win32api ;
STRING command, INTEGER param
retval = WinExec(SYS(2004) + "FOXRUN.PIF /C " + cCommand, 0)
CLEAR DLLS WinExec
RETURN retval
This is how I am calling it:
cCommand = "FORMAT F: /V:VOL /FS:FAT32 /X"
?winexecrun(cCommand)
The function works with other command lines like in the FAQ.
Any suggestions?
Ed