question

MarcHankinMarcAMsAcct-1398 avatar image
0 Votes"
MarcHankinMarcAMsAcct-1398 asked XiaopoYang-MSFT edited

I can't figure out how to a batch file, which opens the ShareX.exe ImageEditor on an image file argument, can close while the ShareX.exe ImageEditor remains open.

I can't figure out how to run the following batch file, named "ShareX_imageditor.cmd",

 "C:\Program Files\ShareX\ShareX.exe" -ImageEditor %1

in a way that will allow the batch console window to close immediately, but leave open the "ShareX.exe -ImageEditor %1" window generated by the batch file, so that the user can use the ShareX ImageEditor that was opened by the batch file.

I made the following 3 (obviously in hindsight) wrong attempts (one at at a time):

 Rem Argument = "E:\Apps\ShareX\Custom_Screenshots\2021-08\EditPadPro8_BRLd6zo0Tp.png"
 echo %1
 1.  START "ShareX Editor" /WAIT "C:\Program Files\ShareX\ShareX.exe" -ImageEditor %1
 2.  cmd.exe /C "C:\Program Files\ShareX\ShareX.exe" -ImageEditor %1
 3.  nircmd exec hide "C:\Program Files\ShareX\ShareX.exe" -ImageEditor %1

Any suggestions about where I could find the answer would be much appreciated.

If this is the wrong forum:
1. Please accept my apologies; and
2. Please let me know you what the right forum is, if you know.

Please let me know if I used the right tags for this question; or alternative, what the right tags would have been.

Thank you very much for any help you can give me.

Marc




dotnet-cli
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Viorel-1 avatar image
0 Votes"
Viorel-1 answered

Try START without /WAIT:

 START "ShareX Editor" "C:\Program Files\ShareX\ShareX.exe" -ImageEditor %1


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.