Writing executable script in Windows 10

Anonymous
2020-09-26T20:31:23+00:00

Is it possible to write a DOS script to run in Windows 10?  Just the good old fashioned DOS commands written into an executable (.exe) file.  When I wrote a script with a .exe extension and try to run it I just get this message.  I just wrote it in Notepad, saved it as "script1.exe", and tried to run it and get the message below.

I don't know how to write the executable file in 64 bit.

Thank you very much,

Steve Keller

Windows for home | Windows 10 | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} vote
Answer accepted by question author
  1. Anonymous
    2020-09-26T21:50:45+00:00

    Is it possible to write a DOS script to run in Windows 10?  Just the good old fashioned DOS commands written into an executable (.exe) file.  When I wrote a script with a .exe extension and try to run it I just get this message.  I just wrote it in Notepad, saved it as "script1.exe", and tried to run it and get the message below.

    I don't know how to write the executable file in 64 bit.

    DOS is an operating system that died 20 years ago with Windows ME. You are probably thinking of console commands. You can write such commands using notepad.exe but you must then save them as xxx.bat.

    Executables are (and were) created by using a suitable compiler, e.g. a C++ compiler.

    3 people found this answer helpful.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Anonymous
    2020-09-27T17:54:53+00:00

    Ah yes, .bat.  I write batch scripts and execute them at the command prompt for reading and modifying lots of text input and output files for engineering codes.  For example, from a hundred text output files I would use the "find" command to search for the line "the fluid velocity equals" and redirect the output from the command prompt to another text file and paste into Excel.  So yeah, I can only do it with a .bat not .exe.  Haven't done for a couple of years though.

    I know the command prompt isn't actually DOS because it no longer actually operates the computer like in the old days when Windows was just the interaction environment.  But the command prompt looks like DOS so sometimes I just call it the DOS prompt.

    Thanks,

    Steve

    0 comments No comments
  3. Anonymous
    2020-09-27T19:51:42+00:00

    So yeah, I can only do it with a .bat not .exe.  Haven't done for a couple of years though.

    It's actually the other way round. Batch files cannot find anything, you need an .exe file for this, e.g. find.exe. You then use the batch file to invoke find.exe with the appropriate paramters.

    0 comments No comments