Tuesday 19 June 2018

windows - how to run an executable file without EXE extension using CMD script?


The situation is that I have a portable application that needs to have set environment variable. Other way it tries to set it's settings in user program data dir.


To avoid running the executable in non-portable mode (to avoid allowing it to run without any parameters) I erased the file's ".exe" extension, but then I cannot run it not only by mouse (which I want) but also through start command.


Is there any way to run such executable file that has no exe extension ?



Answer



Yes – simply entering the program's full filename usually works. (The .exe requirement only exists in the GUI shell.)


(It might be that the file needs an extension, though – so if you can't get MyProgram to run, rename it to MyProgram.notexe or MyProgram.lol and try again.)


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...