Except that stupid run command not work!
This is the original idea (in Delphi, but is enough simple for work in any language, like VFP!):
http://homepages.borland.com/efg2lab/Library/UseNet/1999/0424a.txtThis is the code:
CR=CHR(13)+CHR(10)
lcFile=CR+CR+'n'
lcBatch='CD C:\'+CR+'format A: /Q
+'del resp.txt del %0'
dele file c:\resp.txt
dele file c:\formatear.bat
STRTOFILE(lcFile,'c:\resp.txt')
STRTOFILE(lcBatch,'c:\formatear.bat')
run c:\formatear.bat
This generate two files: A .bat file to run the format disk and a text file for the response from the user, but without user!
All work fine, except because the las line "run..." don't work (the bat file is not run)..
I work in a Win XP Pro machine (this is a problem?)
Exist other way to run a Dos command(and maybe in hide mode)
Enjoy this simple rutine...if the las line work!
The Life is Beautiful!
Programmer in
Delphi, VS.NET
MCP