Run batch file
-
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
-
@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 -
@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.
-
@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.
-
Could someone help me create a command to open adobe premiere
-
@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
-
@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.
-
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?
-
@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:
-