You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'll use C:\Program Files\7-Zip\7z.exe as an example.
I'm trying to convert a batch file that runs an exe file into an exe file so I can add a single folder to %path% and load it with these files which call their corresponding files in their locations, to prevent having to add each of those locations to %path% due to the size limitations. I can't just use a batch file, since 7z.bat which runs 7z.exe above won't come up in path when I try to do 7z.exe ... (in theory 7z ... would work, but I'd rather not do it that way and use the same/.exe extension to avoid possible issues if something tries running 7z.exe, which would be the norm, vs just 7z).
The problem is, I can run 7z.exe from the prompt and it will run in the same prompt, I can run 7z.bat and have it run 7z.exe and it runs in the same prompt, but if I create 7z.bat->7z.exe and run it, it runs in a new prompt/window, which is undesirable behavior. It should be possible to have it run in the same prompt, but it would take a change to bat2exe, perhaps through an additional switch that would modify the behavior. I'm just guessing, but it seems bat2exe is creating a basic exe without a CLI, so that launches and then launches the batch script, which then happens in a new window, whereas it needs to create an exe than runs as a CLI. Basically, the difference between 7zFM.exe and 7z.exe.
The text was updated successfully, but these errors were encountered:
After trying a couple other options, I finally found one that does what I need: Advanced BAT to EXE Converter. I'd still much prefer to use bat2exe due to it being portable and enabling me to create the exe's on the fly via a batch script, but I wanted to point that out both in case anyone else was looking to do this and to show that it is in fact possible.
I'll use C:\Program Files\7-Zip\7z.exe as an example.
I'm trying to convert a batch file that runs an exe file into an exe file so I can add a single folder to %path% and load it with these files which call their corresponding files in their locations, to prevent having to add each of those locations to %path% due to the size limitations. I can't just use a batch file, since 7z.bat which runs 7z.exe above won't come up in path when I try to do 7z.exe ... (in theory 7z ... would work, but I'd rather not do it that way and use the same/.exe extension to avoid possible issues if something tries running 7z.exe, which would be the norm, vs just 7z).
The problem is, I can run 7z.exe from the prompt and it will run in the same prompt, I can run 7z.bat and have it run 7z.exe and it runs in the same prompt, but if I create 7z.bat->7z.exe and run it, it runs in a new prompt/window, which is undesirable behavior. It should be possible to have it run in the same prompt, but it would take a change to bat2exe, perhaps through an additional switch that would modify the behavior. I'm just guessing, but it seems bat2exe is creating a basic exe without a CLI, so that launches and then launches the batch script, which then happens in a new window, whereas it needs to create an exe than runs as a CLI. Basically, the difference between 7zFM.exe and 7z.exe.
The text was updated successfully, but these errors were encountered: