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

    No-GUI TRIGGERcmd agent that works on 32bit Windows

    Announcements
    5
    25
    8.3k
    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.
    • RussR
      Russ
      last edited by Russ

      This agent doesn't have a GUI (Graphical User Interface) so you'll have to use a text editor like notepad to edit your C:\Users\(username)\.TRIGGERcmdData\commands.json file manually.

      This version works on any Windows version above Windows XP, including 32bit versions.

      Instructions:

      • Install NodeJS
        • https://nodejs.org/dist/latest-v4.x/node-v4.8.6-x86.msi <- 32bit Windows Vista or server 2008 non-R2
        • https://nodejs.org/dist/v8.9.1/node-v8.9.1-x86.msi <- 32bit Windows 7 or newer
        • https://nodejs.org/dist/v8.9.1/node-v8.9.1-x64.msi <- 64bit Windows 7 or newer
      • Download this zip file.
      • Unzip it to a folder.
      • Double-click triggercmdagent.bat

      triggercmdagent.bat

      Profit:

      cmd_window

      EDIT 5/2/2018: For a 32bit GUI editor, check this out.

      Russell VanderMey

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

        Hello Russ,

        I'm completly new to that. I'm trying to get the 32bits version from "this" link, but I have a message that says "the web page cannot be found".

        Did it moved somewhere else ?

        Thanks.

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

          @gcabot, thanks for telling me that link was broken. I fixed it.

          BTW, this version works on 64bit versions of Windows too, but I think most people would prefer the full version with the GUI.

          Russell VanderMey

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

            Thanks Russ,
            The link works now. I downloaded.
            Now I try to figure out how it works 🙂

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

              @gcabot, good luck. Let me know if I can help.

              The configuration is in your commands.json file. You can edit it in Notepad by pressing Windows key and R, and pasting this command in:

              notepad %userprofile%\.TRIGGERcmdData\commands.json
              

              Russell VanderMey

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

                Thanks Russ,
                I put a new command (internet) in the command.json file:

                [
                {"trigger":"Reboot in 10 seconds","command":"shutdown /r /t 10","ground":"background","voice":"reboot"},
                {"trigger":"Calculator","command":"calc","ground":"foreground","voice":"calculator"},
                {"trigger":"Notepad","command":"notepad","ground":"foreground","voice":"notepad"},
                {"trigger":"Internet","command":"c:\program files\internet explorer\iexplore","ground":"foreground","voice":"internet"}
                ]

                But the agent keeps deleting it. I cannot find the error. I put my comma separator at the end and everything looks ok to me.

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

                  I doubled the \ "ex:\" now the agent recognised the command but it's not executed. Finally I made a shortcut instead and now it works.
                  It took a while for Alexa to learn the new command.

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

                    @gcabot, sorry I didn't see this until now, but good job getting it to work. The double backslashes are necessary to "escape" a backslash to be compatible with .json. That's one reason I built the GUI editor - the text file and those backslashes are a pain to deal with.

                    Russell VanderMey

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

                      Hi Russ, does this 32-bit support parameter as in the GUI 64-bit?

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

                        @tim-tran, yes. It has the same functionality. Just add "allowParams": "true" to commands.json entry.

                         {
                          "trigger": "Logger",
                          "command": "d:\\tools\\logger.bat",
                          "ground": "foreground",
                          "voice": "",
                          "allowParams": "true"
                         },
                        

                        Russell VanderMey

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

                          I was banging my head on my desk trying to install TriggerCMD on my compute-stick until I found this. It's tiny but hosts my remote support software but it is x86 so....

                          Couple of hiccoughs:

                          1. How do I register this computer under my account? Half the reason I want to install it on this computer is to try to get WOL working on my main PC.
                          2. Once I've run the batch file, I don't have a .TRIGGERcmdData folder under %userprofile%. The closest I've got is a wincommands.json file in the folder where the batch itself is (under Program Files for reasons).
                          RussR 1 Reply Last reply Reply Quote 0
                          • RussR
                            Russ @Xander
                            last edited by

                            @xander, the first time you run the batch file it should prompt you for your token from the Instructions page like this:

                            C:\triggercmdagent>node C:\triggercmdagent\agent --console
                            Daemon install: false
                            No token exists.  Login to request one.
                            prompt: token:
                            

                            It should also create a C:\Users\(yourUser)\.TRIGGERcmdData folder, and copy the wincommands.json file to C:\Users\(yourUser)\.TRIGGERcmdData\commands.json which is the file you should edit to add commands.

                            Russell VanderMey

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

                              @russ -- Just re-ran it and the cmd window closes itself a few seconds, even tried it as Admin. The stick-pc is running Win10 Home, if that helps and the Node.js version is the Win7x32 one.

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

                                @xander, I don't have much info yet, but if you open a cmd window and run the batch file from there, it might give us some useful output.

                                Line this:

                                • Press Windows key and R
                                • Type cmd, and press enter.
                                • Type cd \triggercmdagent <- (or whatever folder you unzipped it to) and press enter
                                • Type triggercmdagent and press enter.
                                • Copy/paste the output into this forum thread.

                                Russell VanderMey

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

                                  C:\Program Files\TriggerCMD>node C:\Program Files\TriggerCMD\agent --console
                                  module.js:538
                                  throw err;
                                  ^

                                  Error: Cannot find module 'C:\Program'
                                  at Function.Module._resolveFilename (module.js:536:15)
                                  at Function.Module._load (module.js:466:25)
                                  at Function.Module.runMain (module.js:676:10)
                                  at startup (bootstrap_node.js:187:16)
                                  at bootstrap_node.js:608:3

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

                                    @xander, awesome!!

                                    I see the problem. This command is failing because there's a space between Program and Files.

                                    node C:\Program Files\TriggerCMD\agent --console
                                    

                                    Please change the command in triggercmdagent.bat to this:

                                    node "%~dp0agent" --console
                                    

                                    Or just re-download the zip file. I updated it to add those quotes.

                                    The quotes should allow you to put this in a folder that has spaces in the name.

                                    Thanks for discovering this, and for your patience.

                                    Russell VanderMey

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

                                      Workin' ... almost.

                                      Token entered, it now shows up on my list here on your site. Entered a new command in the commands.json but, even after allowing some time for that list to sync up, it's not showing. FWIW, the default list had three commands built into it (reboot, calc, notepad) and only two show up server-side (calc, notepad).
                                      https://i.gyazo.com/0a9e27487781c04fe5ab2d2949f4f164.png
                                      Even with that, Alexa "can't find trigger command Notepad on the stick" She said she was triggering Calculator...but it never opened (and shows "0 runs" on the server). Update: eventually got Alexa to say she was running it but, like Calc, nothing did.

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

                                        @xander, good progress.

                                        The reason only Calculator and Notepad show up is you're only running a foreground agent. The background agent won't work in your case because you're using the basic 32bit Windows agent. The foreground agent reads foreground commands from commands.json, and the background agent reads the background commands.

                                        Are you able to run the commands from the green Trigger buttons on the website?

                                        Do you get any output in your cmd window when you trigger a command from the website?

                                        Russell VanderMey

                                        prik mP 1 Reply Last reply Reply Quote 0
                                        • prik mP
                                          prik m @Russ
                                          last edited by

                                          @Russ
                                          I'm posting here because I followed the previos posts instruction to installa the agent on a Win 7 32bit PC.

                                          Yesterday I did the same on my PC (Win 7 64) to test the remote controls through Alexa on my phone (waiting for the delivery of an Echo 4 ge speaker) and everything works.
                                          Now I'm setting up an agent on my wife's music PC so she can control Foobar remotely with Google assistant.
                                          On the site I can see the computer and the triggers (Calc and notepad) but clicking on the green button I can only see the site going into another page for a second and then coming back to the list, but on the PC and in in a vmd window nothing happens.

                                          What should I check?

                                          Thank you.

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

                                            @prik-m,

                                            Please confirm your wife's computer is 32bit so you're running the agent in a cmd window? Will you please send me a screenshot?

                                            If you see the computer in your wife's TRIGGERcmd account, then it must have talked to TRIGGERcmd at some point and logged in with her token.

                                            The screenshot might show me whether it's connected to the server.

                                            Also, please show me the version of node js you're using by typing this command:

                                            node --version
                                            

                                            Russell VanderMey

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