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

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
nik.mike
Posts: 1
Joined: 25 Jul 2023 13:11

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

#1 Post by nik.mike » 25 Jul 2023 13:17

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.

Squashman
Expert
Posts: 4472
Joined: 23 Dec 2011 13:59

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

#2 Post by Squashman » 31 Jul 2023 22:05

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.

Post Reply