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.

Marc Hankin____MarcA_MsAcct 1 Reputation point

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.


A cross-platform toolchain for developing, building, running, and publishing .NET applications.
324 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Viorel 113.7K Reputation points

    Try START without /WAIT:

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