简体   繁体   English

为什么批处理文件(.bat)转换为可执行文件(.exe)不起作用?

[英]Why does batch file (.bat) converted to executable (.exe) not work?

So I have a batch file that I am trying to convert but i'm no success. 所以我有一个要转换的批处理文件,但没有成功。 The converter that I am using is 我正在使用的转换器是
Bat To Exe Converter . 蝙蝠到埃克转换器 The problem that I am encountering is that after converting the batch file it does not execute properly and immediately says "Press any key to continue . . ." 我遇到的问题是,转换批处理文件后,该文件无法正确执行,并立即显示“按任意键继续...”。 and then closes. 然后关闭。 The batch file works fine on its own and when I converted it using the websites online converter it also worked (I would use the online but has little functions and is not exactly what I need). 批处理文件本身可以正常工作,当我使用网站的在线转换器对其进行转换时,它也可以工作(我可以在线使用,但功能很少,而且并不是我所需要的)。

Below is the batch code that I am using: 以下是我正在使用的批处理代码:

@ECHO OFF
TITLE ADB Over Network Running...
COLOR 17
CLS
IF "%ANDROID_PLATFORM_TOOLS%" == "" GOTO NOPATH
ADB tcpip 5555
IF ERRORLEVEL 1 GOTO END
IF ERRORLEVEL 0 GOTO NEXT
GOTO END
:NEXT
set /P ip=Enter Devices IP: %=%
ADB connect %ip%
GOTO END
:NOPATH
ECHO "ANDROID_PLATFORM_TOOLS" not found. Please add this environment variable
GOTO END
:END
PAUSE
EXIT

I hope that you can help me. 我希望你能帮助我。 Thank you for any help and your time :D 谢谢您的帮助和您的时间:D

As all that program does is extract the batch file into a subfolder of temp and execute it, Windows has the exact same feature. 由于该程序所做的只是将批处理文件提取到temp的子文件夹中并执行该文件,因此Windows具有完全相同的功能。

Type 类型

iexpress

in Start - Run and follow the wizard and set your bat to run as the last step. 在“开始”-“运行”中并按照向导进行操作,并将蝙蝠设置为最后一步。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM