Results 1 to 1 of 1
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Shortcut Vs. DOS Window

    As if I still needed to prove that I don't know everything ....

    The batch file below runs perfectly when I execute it from a DOS command prompt in a DOS window opened up under Win98SE.

    If I create a shortcut to the batch file, and place the shortcut on the desktop, and then execute the batch file by double-clicking on the shortcut, it executes differently.

    The specific problem seems to lie in the manner in which the Format command obtains responses to its prompts from the file c:utilFFMT.dat.


    The file c:utilFFMT.dat contains three lines, the first two are composed of the letter "N" and a CR/LF. The third line is empty, so the file looks like this stream of characters: N CRLF N CRLF CRLF


    I figured it was something to do with the properties of the Icon for my DOS Window and the Icon for my shortcut to the batch file, so a comparison seemed in order.

    Tab General: Identical

    Tab Program: DOS prompt shortcut has a Shift-Ctrl-C key assigned; 98ScanAA.BAT prompt shortcut has a Shift-Ctrl-S key assigned

    The command lines differ, of course: "C:WINDOWSCOMMAND.COM" for the dos prompt and "C:BAT98SCANAA.BAT" for the 98ScanAA.bat file.

    Tab Program (Advanced): Identical

    Tab Fonts: Identical

    Tab Memory: Identical

    Tab Window: Identical

    Tab Misc: Identical


    The failure in running the batch file from a shortcut is evidenced by this display :
    <pre>(snip)
    QuickFormatting 1.44M
    Format complete.


    1,457,664 bytes total disk space
    1,457,664 bytes available on disk

    512 bytes in each allocation unit.
    2,847 allocation units available on disk.

    Volume Serial Number is 1052-1105

    QuickFormat another (Y/N)?N
    QuickFormat another (Y/N)?
    QuickFormat another (Y/N)?
    </pre>


    It seems that the c:utilffmt.dat file is managing to deliver one of its letters "N" to the Format command, but the format command seems to ignore it.

    Tapping the "N" key on the keyboard at this point results in no text being delivered to the command, because, of course, the Format command has been told to get its input from the redirected file c:utilffmt.dat and has run out of characters.

    I have attached a PKZip file with the batch and data file.

    <pre>REM 98ScanAA.bat Christopher Greaves Wednesday, March 27, 2002
    if "
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •