How to Make EXE Files Using Notepad

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.
Image Credit: Tom Werner/DigitalVision/GettyImages

An EXE file is a type of program that runs in Microsoft Windows. It consists of binary, machine language code that's not designed to be read or written by humans. While it might be possible to edit an EXE file directly in Notepad or another text editor, the process would be tedious and error-prone. You can use Notepad to write source code that can be executed directly or compiled to an EXE file.


Create an EXE File

When you want to create an EXE file on Windows, you typically use a compiler to turn a human-readable programming language in what's called source code into machine code that a computer can execute. An EXE file contains machine code in a specific format designed by Microsoft. Other operating systems such as macOS and Linux have their own, equivalent formats.


Video of the Day

Free compilers for languages like C and C++ are available from Microsoft and other software makers. The Visual Studio Code suite from Microsoft is well regarded and available for free, and other free and open source programming tools are also available for Windows.

Even EXE file code for basic programs is difficult for a human to read or write directly. Programs called decompilers turn EXE code back into source code, although it's not always as readable as source code written by a human.


Open Notepad or Another Editor

Even though you can write source code in Notepad, the basic text editor that comes with Windows, many programmers prefer to use a more sophisticated tool called an integrated development environment, or IDE.


An IDE automates compiling and running the code, spots common errors, and autocompletes common programming language phrases and variable names as you work. It also highlights programming language syntax and helps you place punctuation like semicolons and parentheses.

Many programmers also use source code control tools like Microsoft's Visual SourceSafe or the free tool called Git to organize their code. These tools make it possible to store historical versions of source code and let multiple programmers work together on coding projects.



Batch Files and PowerShell

Traditionally, Microsoft DOS and Windows operating systems came equipped with a simple programming system called batch scripting. Batch scripts, like other so-called scripting languages, can be run directly from Windows or the command prompt without needing a separate compilation stage. Batch files can be used to automate simple tasks on Windows, such as installing software, setting up network connections or backing up files.


More recently, Microsoft has introduced a more powerful scripting environment called PowerShell. PowerShell allows you to access the .NET suite of functionality on Windows and is more efficient than batch scripting.

You can also install third-party scripting languages such as Python and Ruby on Windows.

Whatever you choose, you can edit scripting language code in a text editor such as Notepad or a more sophisticated product.




Report an Issue

screenshot of the current page

Screenshot loading...