win_service_control 1.0.2

a windows service operation used in node-red, For programe base on nodejs

npm install win_service_control

A Node-RED node to make a nodejs programme to a windows service...

Install

You can install this node directly from the "Manage Palette" menu in the Node-RED interface.

Alternatively, run the following command in your Node-RED user directory - typically ~/.node-red on Linux or %HOMEPATH%\.nodered on Windows

    npm install win_service_control

NodeJS version 10 or greater and Node-RED version 1.0 or greater is required.

Usage

You can improt follow json to your own node-red project . those node contain install uninstall stop start server based nodejs. [ { "id": "8c4bdd85679a74bb", "type": "tab", "label": "Flow 2", "disabled": false, "info": "", "env": [] }, { "id": "ec32585b395a1ac7", "type": "inject", "z": "8c4bdd85679a74bb", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 180, "y": 220, "wires": [ [ "2f1cc72f97ea1769" ] ] }, { "id": "de66537764224e4a", "type": "debug", "z": "8c4bdd85679a74bb", "name": "debug 53", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 640, "y": 220, "wires": [] }, { "id": "2f1cc72f97ea1769", "type": "win_service_control", "z": "8c4bdd85679a74bb", "name": "install", "mcommand": "install", "mservicename": "Node-Red", "mservicedescription": "", "mserviceExecutePath": "C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\node-red\\red.js", "mexecuteOption": "--port 5000 --userDir C:\\Users\\Administrator\\.node-red", "x": 350, "y": 220, "wires": [ [ "de66537764224e4a" ] ] }, { "id": "ccefb524b41aec2e", "type": "win_service_control", "z": "8c4bdd85679a74bb", "name": "uninstall", "mcommand": "uninstall", "mservicename": "Node-Red", "mservicedescription": "1", "mserviceExecutePath": "C:\Users\Administrator\AppData\Roaming\npm\node_modules\node-red\red.js", "mexecuteOption": "--port 5000 --userDir C:\Users\Administrator\.node-red", "x": 360, "y": 280, "wires": [ [ "de66537764224e4a" ] ] }, { "id": "c3bdfde857330a4b", "type": "inject", "z": "8c4bdd85679a74bb", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 180, "y": 280, "wires": [ [ "ccefb524b41aec2e" ] ] }, { "id": "c13e961598ef5744", "type": "win_service_control", "z": "8c4bdd85679a74bb", "name": "start", "mcommand": "start", "mservicename": "Node-Red", "mservicedescription": "1", "mserviceExecutePath": "C:\Users\Administrator\AppData\Roaming\npm\node_modules\node-red\red.js", "mexecuteOption": "--port 5000 --userDir C:\Users\Administrator\.node-red", "x": 350, "y": 340, "wires": [ [ "de66537764224e4a" ] ] }, { "id": "5f9eedbcd529482c", "type": "inject", "z": "8c4bdd85679a74bb", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 180, "y": 340, "wires": [ [ "c13e961598ef5744" ] ] }, { "id": "fed93b6ac27ffa08", "type": "win_service_control", "z": "8c4bdd85679a74bb", "name": "stop", "mcommand": "stop", "mservicename": "Node-Red", "mservicedescription": "1", "mserviceExecutePath": "C:\Users\Administrator\AppData\Roaming\npm\node_modules\node-red\red.js", "mexecuteOption": "--port 5000 --userDir C:\Users\Administrator\.node-red", "x": 350, "y": 400, "wires": [ [ "de66537764224e4a" ] ] }, { "id": "98c2df4c3b945761", "type": "inject", "z": "8c4bdd85679a74bb", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 180, "y": 400, "wires": [ [ "fed93b6ac27ffa08" ] ] } ]

Node Info

Version: 1.0.2
Updated 11 months, 1 week ago
License: ISC
Rating: not yet rated

Actions

Rate:

Downloads

0 in the last week

Nodes

  • win_service_control

Keywords

  • windows service
  • node-red

Maintainers