Page 1 of 1

Batch file works fine. When converted to exe it doesn't

Posted: 25 Jul 2023 13:17
by nik.mike
I'm trying to create an exe file out of a batch file. when executing the batch file it works as it should, however when converted to exe it no longer able to execute the command.

Re: Batch file works fine. When converted to exe it doesn't

Posted: 31 Jul 2023 22:05
by Squashman
Search the forum. This topic has been covered ad nauseam.
Those threads will discuss the basics.
1) You are not creating an executable. You are creating a self-extracting file. It first extracts all the data to a temporary folder before executing.
2) The exe extracting the batch file to a temporary folder will wreak havoc with what you think is the current working directory but it really isn't.