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

    Run batch file

    Windows
    4
    9
    6.5k
    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.
    • ?
      A Former User
      last edited by

      I am new here but looking to run a simple batch file on my PC using Alexa. I can run the batch file manually on the PC (double click the file name) and it works as expected. I have TRIGGER cmd loaded and running. The example commands (notepad and calculator) work fine from Alexa. But I can't seem to figure out the correct syntax to run the .bat file. Alexa seems to understand the voice name and sends the command to the PC but I am missing something simple

      RussR 1 Reply Last reply Reply Quote 0
      • RussR
        Russ @A Former User
        last edited by Russ

        @ScottC, you probably need to specify the full path to the batch file, like this:

        c:\scripts\batchfilename.bat
        

        You can find the folder the batch file is in by right-clicking the file, and clicking Properties. The Location value is the folder. You can copy/paste that, then add the name of the batch file.

        Or, you could add the folder where you stored the batch file to your PATH environment variable.
        Bubba did a good video on how to do that here: https://www.youtube.com/watch?v=SQKW3BRDBtw

        Russell VanderMey

        ? 1 Reply Last reply Reply Quote 0
        • ?
          A Former User @Russ
          last edited by

          @Russ Thanks. That helped. One last question.

          Adding the path to environment variable did help but I had to make the command "start C:\scripts\fix.bat" and then add a line to the batch file for exit to close the CMD window. From the GUI edit window the command worked fine but when I tried to use Alexa it seemed to take the command but did not run the batch file. So added "start" and it worked but left the CMD window open so added last line in batch file as exit and now it runs and closes the CMD window.

          RussR 1 Reply Last reply Reply Quote 0
          • RussR
            Russ @A Former User
            last edited by Russ

            @ScottC, that's interesting. Usually I don't have to add the start prefix, or the exit command to my batch file, but there might be something about your particular batch file that requires those.

            Good job figuring it out.

            Russell VanderMey

            1 Reply Last reply Reply Quote 0
            • tioinfoT
              tioinfo
              last edited by

              Could someone help me create a command to open adobe premiere

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

                @tioinfo, please check out this advice for finding the command for any program:

                https://www.triggercmd.com/forum/topic/718/how-to-run-a-program/2

                Russell VanderMey

                tioinfoT 1 Reply Last reply Reply Quote 0
                • tioinfoT
                  tioinfo @Russ
                  last edited by

                  @Russ hello good night there is a channel on youtube with more than 27000 subscribers outside instagran, i wanted to know if you are interested in closing a partnership with my channel, how would this partnership be? u give me a trigger license in all videos involve alexa we would be leaving the link of the app and we would put it as master sponsor of the channel.

                  1 Reply Last reply Reply Quote 0
                  • Marcos ViníciusM
                    Marcos Vinícius
                    last edited by

                    I need a little help, could you help me? I created a .bat file to restart the network connection and when testing it on the triggercmd page it works but on google home it appears as an offline switch, you know what could be causing this error?

                    RussR 1 Reply Last reply Reply Quote 0
                    • RussR
                      Russ @Marcos Vinícius
                      last edited by Russ

                      @Marcos-Vinícius, I've actually never seen that. Can you send a screenshot showing it's offline?

                      One thing you could try is unlink and re-link your TRIGGERcmd account. It's under Home control under the Assistent tab in Assistant settings.

                      My switches look like this:

                      Screenshot_2020-08-17-17-54-12.png

                      Russell VanderMey

                      1 Reply Last reply Reply Quote 0
                      • tuicemenT tuicemen moved this topic from Instructions on
                      • First post
                        Last post