how could I execute a dll as a exe using batch
batch-file, dll, exe, executable
Solution
If i understand it, you have a `myProgram.exe` file renamed as `myProgram.dll` and want to run that executable.
If this is the case then all you need is to directly invoke the file. To test, from command line, from the same directory where the file is, type `myProgram.dll` and it will execute. The OS will identify the file as executable an run it.
If you want to execute the program from another directory, and you supply the full path to the executable, it will also work.
BUT if you want to call the executable from another directory without indicating the full path to the executable, using the `PATH` variable to locate the program, it will not work.
When a program is search over the folders indicated in `PATH` variable, the content of variable `PATHEXT` determine the extensions of files to search in `PATH` folders. And `.dll` is not in this list.
So, or you indicate the full path to the executable (absolute o relative) or include the `.dll` extension in the `PATHEXT` variable before calling your executable.
Problem
I need to know how I could make a batch file that would execute a dll file as if it was an exe does any one know what I could do I am using windows 7. The file is an exe just with the dll extension.