Celeb Glow
general | March 02, 2026

Is there a Windows exe that does nothing?

Is there a "noop"-esque exe somewhere as part of the Windows installation? I'm preparing some batch jobs and scheduled tasks, and for a couple reasons I'd like to reference an executable that does nothing -- i.e. launches with no visible window, and quits immediately.

Does such an executable exist in the usual Windows installation anywhere? or how can I come close? I do not want to have to depend on anything not already included in Windows.

3

11 Answers

You may use rundll32:

  • No console window
  • No side effects
  • Just 44 KB
  • No arguments required
  • Works on every recent Windows version (XP, Vista, 7), and probably on every NT-based system.
6

Is there a "noop"-esque exe somewhere as part of the Windows installation?

Meaning specifically a program that is meant to do nothing and nothing else? Yes and no. No in that Windows does not include one by default, but it does include the ability to make one yourself.


Option 1

Run notepad.exe, type the following lines, and save it as C:\ret.scr (don’t forget the blank line):

a
ret
rcx
1
n ret.com
w
q

Compile it with debug.exe at the command-prompt (cmd.exe) with following command:

C:\> debug < ret.scr

You now have a program, ret.com (in C:\) that can be used in batch files which does absolutely nothing whatsoever (well, other than quit, if that counts).

Note: debug is not included on 64-bit systems.


Option 2

In Vista and up, the .NET framework is included by default, so you could also make a native, Windows do-nothing .exe with C# (64-bit compatible):

Run notepad.exe and type the following lines, saving it as C:\ret.cs:

class ret
{ static void Main() { }
}

Compile it with csc.exe at the command-prompt (cmd.exe) with the following command:

C:\> csc ret.cs /target:winexe

You now have another program, ret.exe (in C:\) that can be used in batch files which does nothing but return. The target option makes it a GUI app so it does not even open a terminal window.

6

There aren't any programs included with Windows (that I know of) which immediately exit when executed (at least on purpose.)

In Windows Vista and newer, however, there is the timeout.exe utility. Timeout.exe will wait a specified number of seconds and then exit. For example:

C:\>timeout /t 0 > nul:

Setting timeout.exe to wait for 0 seconds is about as close as a you'll get to an EXE that immediately exits.

5

Without parameters "C:\Windows\hh.exe" (Microsoft® HTML Help Executable) does nothing and it is included in any Windows-Version I guess.

I've tried rndll32.exe and hh.exe but both of then didn't alter the %ERRORLEVEL%. It is an environment variable that says if the last executable was successful. Works like the unix return code.

My noop command below will set the %ERRORLEVEL% to zero is:

cd %CD%

Just changing the working directory to the current one.

1

wscript with no arguments runs no script at all, and is a "GUI" executable (does not open a console).

1

the command echo off does nothing within a batch (.BAT) file. Although it is not an executable it is an windows internal command.

2

Compile a simple "Hello World" C++ program to create a simple exe which would exit immediately.
Save following code in a text file with some name like a.cpp:

#include<iostream>
int main()
{ std::cout<<"Hello World";
return 0;
}

Then, compile it with LATEST C++ compiler like MinGW for Windows 7.
In case of MinGW, execute following command in PowerShell or Command Prompt: g++ path\a.cpp (Assuming that you have set environmental PATH variable of g++ binary location or you are in g++ binary directory i.e. c:\mingw\bin by default). After command execution, you will get a.exe which will display Hello World and exit. Verify by double-click... cmd window will appear and disappear immediately. Command line access will display Hello World and return you to CLI prompt.
Then, you can move this a.exe in system32 or anywhere deep inside Windows. You can even roll it out in installation disk of Windows.

7

You can write a no-op in C like so

void main() {
}

and compile it into an .exe file. For example, if you have Visual Studio installed, you can open notepad, paste that snippet, save it as noop.c and in the command prompt use cl noop.c and it will output a noop.exe file in the same folder.

You may or may not have to browse to the Microsoft Visual Studio X.0 folder in Program Files first and run vcvarsall.bat from the command prompt.

1

doskey.exe does nothing and it is in the path by default: it is included on System32 on virtually all Windows systems.

Altough it is not the main purpose of this tool, you can use the /donothing option of WuInstall - you can also specify a return code which should be returned - see

1