Compdigitec Labs

« | Home | »

Launch non-exe extension files as executables

By admin | May 1, 2011

Windows does not come with a built-in way of launching executables that are without the exe extension. However, we have written a small tool called “anylaunch” which allows one to execute any file as if it were an executable. (Non-PE files will still give an error since they are not executables “XYZ is not a valid Win32 application”)

Download (anylaunch.exe) or compile from source below:

#include <iostream>
#include <windows.h>
#include <cstdlib>
//#define ZeroMemory(p,size) memset((p),0,(size))
using namespace std;

int main(int argc, char* argv[])
	if(argc-1 < 1) {
		cout << "No process specified" << endl;
		return 0;
	// must blank it
	si.cb = sizeof(si);
	si.lpReserved = NULL;
	si.lpTitle = NULL;
	// required for GUI app
	si.wShowWindow = SW_MINIMIZE;
	bool res = CreateProcess(NULL,argv[1],NULL,NULL,FALSE,0,NULL,NULL,&si,&pi);
	if(res == false) {
		printf("CreateProcess failed (error code %d)\n", GetLastError());
		return 1;

	return 0;

Download or compile the anylaunch executable and put it into the same directory as your script or into the system directory. You can use it in a command line, batch scripting or another program like so:
anylaunch “<process command line here>”

Simple examples (assuming anylaunch is in system path or current folder):

Although the biggest use of this tool is to launch non-exe PE files, like so:

file yes.123

yes.123: PE32 executable for MS Windows (GUI) Intel 80386 32-bit
Then we can use anylaunch to launch this PE file:

anylaunch yes.123
Non-exe process in Task Manager

Non-exe process in Task Manager

You may run into some problems while running this. If your command line arguments to your target application are not showing up, you should put your entire command line into one argument and escaping quotes (anylaunch “C:\\Program Files\\Mozilla Firefox\\firefox.exe” not anylaunch C:\Program Files\Mozilla Firefox\firefox.exe). Some other common problems:

Accessing a file that does not exist or is inaccessible (The system cannot find the file specified.):

cat somefile.rnd

cat: somefile.rnd: No such file or directory

anylaunch somefile.rnd

CreateProcess failed (error code 2)

Trying to run an invalid Windows application

file Untitled.png

Untitled.png: PNG image, 800 x 600, 8-bit/color RGB, non-interlaced

anylaunch.exe Untitled.png

CreateProcess failed (error code 11) (An attempt was made to load a program with an incorrect format.)
CreateProcess failed (error code 193) (%1 is not a valid Win32 application.)
etc… (invalid format error, or win32 errors, etc)

If you found this article helpful or interesting, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles!

Topics: Windows | 18 Comments »

18 Responses to “Launch non-exe extension files as executables”

  1. Greg Webb Says:
    March 28th, 2013 at 00:24

    Thank you for this utility. I’m using it as one component in replacing Notepad with Notepad++( without making any changes to extensions or Notepad itself.

  2. slot999 Says:
    March 2nd, 2022 at 20:18

    … [Trackback]

    […] Info to that Topic: […]

  3. Posture Says:
    April 11th, 2022 at 23:09

    … [Trackback]

    […] Find More Info here on that Topic: […]

  4. beer777 Says:
    April 30th, 2022 at 20:14

    … [Trackback]

    […] Find More here on that Topic: […]

  5. where to buy good cc live Says:
    May 6th, 2022 at 13:33

    … [Trackback]

    […] Here you will find 32967 additional Information on that Topic: […]

  6. 강남셔츠 Says:
    May 23rd, 2022 at 05:45

    … [Trackback]

    […] There you will find 69991 additional Info to that Topic: […]

  7. Bolton escorts Says:
    June 2nd, 2022 at 06:11

    … [Trackback]

    […] Here you can find 65278 additional Information on that Topic: […]

  8. maxbet Says:
    June 26th, 2022 at 06:49

    … [Trackback]

    […] Information on that Topic: […]

  9. sbo Says:
    August 3rd, 2022 at 19:51

    … [Trackback]

    […] Read More Info here to that Topic: […]

  10. sbo Says:
    August 4th, 2022 at 23:04

    … [Trackback]

    […] Read More to that Topic: […]

  11. buy guardian armory guns onlie Says:
    September 10th, 2022 at 08:49

    … [Trackback]

    […] Read More here on that Topic: […]

  12. plus d'info Says:
    October 5th, 2022 at 20:03

    … [Trackback]

    […] Find More Information here to that Topic: […]

  13. สินเชื่อโฉนดที่ดิน Says:
    October 9th, 2022 at 17:52

    … [Trackback]

    […] Find More Info here on that Topic: […]

  14. sbobet Says:
    October 28th, 2022 at 11:39

    … [Trackback]

    […] Read More on that Topic: […]

  15. psilocybe mushrooms for sale dc area Says:
    January 24th, 2023 at 13:08

    … [Trackback]

    […] Read More Info here on that Topic: […]

  16. Achieving financial freedom Says:
    January 27th, 2023 at 13:49

    … [Trackback]

    […] Find More on to that Topic: […]

  17. Yabo Says:
    January 27th, 2023 at 18:42

    … [Trackback]

    […] Information on that Topic: […]

  18. edible delivery toronto Says:
    January 28th, 2023 at 13:38

    … [Trackback]

    […] Read More on to that Topic: […]