开发者

My BAT file does not execute my executable file?

开发者 https://www.devze.com 2023-03-17 07:35 出处:网络
I have a folder with an exe inside. I am creating a BAT file to run it. Here is the code: START \"C:\\Program Files\\myApp\\XYNTService.exe -i\"

I have a folder with an exe inside. I am creating a BAT file to run it. Here is the code:

START "C:\Program Files\myApp\XYNTService.exe -i"
EXIT

But the exe seems does not being executed. Only the cmd window appear with the开发者_StackOverflow社区 path C:\Program Files\myApp.

How to make the exe run with the -i flag?


If the START command sees something quoted, it assumes it is the title of the command window. The syntax of START looks like this:

START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
      [/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
      [/WAIT] [/B] [command/program]
      [parameters]

    "title"     Title to display in  window title bar.
...

So what you want to try is this:

START "" "C:\Program Files\myApp\XYNTService.exe" -i


Try Run As Administrator for your BAT file.

0

精彩评论

暂无评论...
验证码 换一张
取 消