开发者

My BAT file does not execute my executable file?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜