TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Prevent suppression of cmd window?

    General Discussion
    4
    4
    2.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      Christian Robinson
      last edited by

      I'm on Windows 10, and I have a process that outputs text information to a cmd window. I want to be able to invoke this with TRIGGERcmd, but when I do the cmd window is suppressed, even though the process is visible in the task manager.

      I've tried various invocations in the commands.json file, including explicitly calling cmd to run the command but the cmd window never appears.

      Normally I would consider the suppression of cmd a good thing, since I have some limited experience with wanting to be able to run programs without a cmd window appearing, and had to come up with some interesting workarounds in some cases. I just need a way to override it.

      RussR 1 Reply Last reply Reply Quote 0
      • RussR
        Russ @Christian Robinson
        last edited by Russ

        @Christian-Robinson, I found that if you prefix your command with "start" your cmd window will show up in the foreground.

        {"trigger":"Test","command":"start C:\\test\\test.bat","ground":"foreground","voice":"test"},

        I notice it doesn't exit the window when the batch file completed though - I had to add "exit" to the end of the batch file to have it close.

        Contents of test.bat:
        echo hi
        pause
        exit

        Russell VanderMey

        C 1 Reply Last reply Reply Quote 1
        • C
          Christian Robinson @Russ
          last edited by Christian Robinson

          @Russ Aha! Oddly I thought I had tried that, but I tried it just now and it worked so I'm sure I'm remembering wrong.

          As always, thank you. This is quickly becoming my favorite Alexa skill.

          1 Reply Last reply Reply Quote 0
          • XanderX
            Xander
            last edited by

            @Acacia-Hary That'll be harder to do when you're banned for spamming. Bye.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post