You can use the Rundll32 program in any scripting file or batch file to start the system dialog for formatting a floppy disk. The Rundll32.exe is placed in the \System or \System32 directories of Windows and is thus callable from any place on your system. Insert the following line in your batch file
Rundll32 shell32.dll, SHFormatDrive
You still must set all the formatting options interactively.
You can also use the same technique to format a floppy from a full programming language, since the SHFormatDrive function is not listed in the standard Windows API documentation.
You can also use Rundll32 to run Control Panel applets.