3 ms·
Quote: "Awesome, right? This works just fine on Macs as well." Well, doesn't work on Windows though. I get "Access is denied" when I try to run an empty .exe.
by unnouinceput 5y ago
Quote: "Awesome, right? This works just fine on Macs as well."
Well, doesn't work on Windows though. I get "Access is denied" when I try to run an empty .exe. Even when I do it with an elevated prompt I get the same. Yeah, so..¯\_(ツ)_/¯
- krallja 5y agoTry EMPTY.BAT from CMD.COM, or EMPTY.PS1 from PowerShell. A zero-byte executable doesn’t work on macOS either. This article is about command shell behavior, not UI shell behavior.
- thunderbong 5y agoI don't know how executables work on Windows but I'm guessing that the shell expects a different kind of 'success' response?
- unnouinceput 5y agoThe thing is that the executable is not ran at all. You get the error coming from OS directly before, not after it fake-ish exited like explained in article for Linux/MacOS. I think this was neatly explained by Ray in one of his older entries. The OS tries to load the .exe's header, then assign heap+stack according to that header, and only then will start the execution at entry point pointed by the header. So, empty file -> no header -> OS complains -> no execution + above error.
- JoBrad 5y agoMaybe an empty com file will work?
- unnouinceput 5y agoNope, same error message.
- pjmlp 5y agoWindows isn't a UNIX clone, at very much an VMS inspired OS.