Node-red-windows-installer

There are loaders available to cloak non daemon apps to run as a service, but we start adding bloatware in doing so.

IMO - Task Scheduler set to "At System Start Up", is keeping it all native?

We use Task Scheduler with all our Node Instances, and all seem to run like clock work, its also easier for the end-user to understand how it is started, and by what user.

In fact, there's the (perhaps) less professional and meanwhile (perhaps considered) obsolete option to add a link to the autostart group as well. The combination could look like this:

Feedback?

I don't think any of these are wrong or bad - just options. :grin:

If you start at system startup, you need to decide what user id to use of course. You can use SYSTEM but then may not get access to some user resources, especially on a desktop system. And it means that you are effectively running as a privileged service which might not be allowed on some managed systems and can have cyber implications on others.

Sorry for raising these speed-bumps but worth getting things out in the open before committing.

Though more complex, it might be worth considering 2 options. I think that Task Scheduler is OK but perhaps offer one as running at system start with the SYSTEM user and another option to run at logon with the current user?

Personally, where SYSTEM is to be used - Dont :grimacing:

instead, use a dedicated (unprivileged) account, which can be created with little issue.

net user /add NodeRED Password123

The only minor issue, that may be overcome in the same command is to allow Logon as batch job for the user NodeRED - windows way of saying, this user is allowed to run whilst not logged on with an interactive shell.

This gives piece of mind (and to the user) the installed Node RED instance cannot do harm on the system by having access to resources, that an admin/system account can.

1 Like

This install of Node-Red on win10 interests me since the abandonment of Node-Red-Desktop

@sakazuki if you catch me...

However with this Beta 2 (v0.9.2.0) , I encounter an installation problem:
python
fail python
FYI: Node-Red-Desktop is still installed (but not running)
Python 2.7, 3.6 and 3.9 are installed
pyt

What else to do?

Thank you for testing this installer! :+1:
Let's try to figure out, what happened:

  • Could you please post a shot of the setup page labeled 'Final verification' - or at least a copy of the configuration that is displayed there?
  • Did you notice - by chance - that the installer was downloading the python installation file?
  • Is the mentioned directory empty, not present - or just this file missing? Be aware that the installer deletes this (temporary) directory when it closes - so you have to check while the error message is present!

Where is this Final verification?
In the installation folder I have only:
nr dir

Sorry I was doing 2 things at the same time, I only saw the end of the install :woozy_face:

However, I have a setup log that talks about it:

2023-05-03 11:59:01.103   Log opened. (Time zone: UTC+02:00)
2023-05-03 11:59:01.103   Setup version: Inno Setup version 6.2.2
2023-05-03 11:59:01.103   Original Setup EXE: C:\Users\Christian\Desktop\Node-Red.Installer.exe
2023-05-03 11:59:01.103   Setup command line: /SL5="$10153C,851310,819712,C:\Users\Christian\Desktop\Node-Red.Installer.exe" /SPAWNWND=$F0A14 /NOTIFYWND=$E0AC6 
2023-05-03 11:59:01.103   Compatibility mode: Yes (DetectorsAppHealth Installer)
2023-05-03 11:59:01.103   Windows version: 10.0.19044  (NT platform: Yes)
2023-05-03 11:59:01.103   64-bit Windows: Yes
2023-05-03 11:59:01.103   Processor architecture: x64
2023-05-03 11:59:01.103   User privileges: Administrative
2023-05-03 11:59:01.118   Administrative install mode: Yes
2023-05-03 11:59:01.118   Install mode root key: HKEY_LOCAL_MACHINE
2023-05-03 11:59:01.118   64-bit install mode: No
2023-05-03 11:59:01.118   Created temporary directory: C:\Users\CHRIST~1\AppData\Local\Temp\is-93AE8.tmp
2023-05-03 11:59:01.118   -- DLL function import --
2023-05-03 11:59:01.118   Function name: ImageList_Add
2023-05-03 11:59:01.118   DLL name: Comctl32.dll
2023-05-03 11:59:01.118   Dest DLL name: Comctl32.dll
2023-05-03 11:59:01.118   Importing the DLL function.
2023-05-03 11:59:01.118   Successfully imported the DLL function. Delay loaded? No
2023-05-03 11:59:01.118   -- DLL function import --
2023-05-03 11:59:01.118   Function name: ImageList_Create
2023-05-03 11:59:01.118   DLL name: Comctl32.dll
2023-05-03 11:59:01.118   Dest DLL name: Comctl32.dll
2023-05-03 11:59:01.118   Importing the DLL function.
2023-05-03 11:59:01.118   Successfully imported the DLL function. Delay loaded? No
2023-05-03 11:59:01.118   -- DLL function import --
2023-05-03 11:59:01.118   Function name: SendMessageW
2023-05-03 11:59:01.118   DLL name: User32.dll
2023-05-03 11:59:01.118   Dest DLL name: User32.dll
2023-05-03 11:59:01.118   Importing the DLL function.
2023-05-03 11:59:01.118   Successfully imported the DLL function. Delay loaded? No
2023-05-03 11:59:01.118   -- DLL function import --
2023-05-03 11:59:01.118   Function name: SetTimer
2023-05-03 11:59:01.118   DLL name: user32.dll
2023-05-03 11:59:01.118   Dest DLL name: user32.dll
2023-05-03 11:59:01.118   Importing the DLL function.
2023-05-03 11:59:01.118   Successfully imported the DLL function. Delay loaded? No
2023-05-03 11:59:01.118   [NR] We are going to install the 64bit version of Node.js.
2023-05-03 11:59:01.118   [NR] Node.js Recommended Version definition: 'xxx' not in validated list of supported versions. Forced to v16!
2023-05-03 11:59:01.165   Extracting temporary file: C:\Users\CHRIST~1\AppData\Local\Temp\is-93AE8.tmp\nodejs.bmp
2023-05-03 11:59:01.165   Extracting temporary file: C:\Users\CHRIST~1\AppData\Local\Temp\is-93AE8.tmp\node-red.bmp
2023-05-03 12:00:00.670   Downloading temporary file from https://raw.githubusercontent.com/nodejs/node/main/LICENSE: C:\Users\CHRIST~1\AppData\Local\Temp\is-93AE8.tmp\node.license
2023-05-03 12:00:00.670   Download is not using basic authentication
2023-05-03 12:00:01.321     0 of 116614 bytes done.
2023-05-03 12:00:01.385     116614 of 116614 bytes done.
2023-05-03 12:00:01.400   Successfully downloaded file to {tmp}: node.license
2023-05-03 12:00:01.400   Downloading temporary file from https://raw.githubusercontent.com/node-red/node-red/master/LICENSE: C:\Users\CHRIST~1\AppData\Local\Temp\is-93AE8.tmp\red.license
2023-05-03 12:00:01.400   Download is not using basic authentication
2023-05-03 12:00:01.614     0 of 10247 bytes done.
2023-05-03 12:00:01.629     10247 of 10247 bytes done.
2023-05-03 12:00:01.629   Successfully downloaded file to {tmp}: red.license
2023-05-03 12:00:01.629   Downloading temporary file from https://github.com/microsoft/vswhere/releases/download/3.1.1/vswhere.exe: C:\Users\CHRIST~1\AppData\Local\Temp\is-93AE8.tmp\vswhere.exe
2023-05-03 12:00:01.629   Download is not using basic authentication
2023-05-03 12:00:02.445     0 of 469432 bytes done.
2023-05-03 12:00:02.715     469432 of 469432 bytes done.
2023-05-03 12:00:02.715   Successfully downloaded file to {tmp}: vswhere.exe
2023-05-03 12:00:02.731   Downloading temporary file from https://github.com/node-red/node-red/releases/latest: C:\Users\CHRIST~1\AppData\Local\Temp\is-93AE8.tmp\red.releases
2023-05-03 12:00:02.731   Download is not using basic authentication
2023-05-03 12:00:03.483     0 bytes done.
2023-05-03 12:00:03.562   Downloading temporary file from https://nodejs.org/dist/latest-v16.x/SHASUMS256.txt: C:\Users\CHRIST~1\AppData\Local\Temp\is-93AE8.tmp\node16.sha
2023-05-03 12:00:03.562   Download is not using basic authentication
2023-05-03 12:00:03.889     0 bytes done.
2023-05-03 12:00:03.889   Downloading temporary file from https://nodejs.org/dist/latest-v18.x/SHASUMS256.txt: C:\Users\CHRIST~1\AppData\Local\Temp\is-93AE8.tmp\node18.sha
2023-05-03 12:00:03.889   Download is not using basic authentication
2023-05-03 12:00:04.067     0 bytes done.
2023-05-03 12:00:04.067   Downloading temporary file from https://nodejs.org/dist/latest-v20.x/SHASUMS256.txt: C:\Users\CHRIST~1\AppData\Local\Temp\is-93AE8.tmp\node20.sha
2023-05-03 12:00:04.067   Download is not using basic authentication
2023-05-03 12:00:04.314     0 bytes done.
2023-05-03 12:00:04.379   [NR] 16
2023-05-03 12:00:04.379   [NR] 16.20.0
2023-05-03 12:00:04.379   [NR] 18
2023-05-03 12:00:04.379   [NR] 18.16.0
2023-05-03 12:00:04.379   [NR] 20
2023-05-03 12:00:04.394   [NR] 20.0.0
2023-05-03 12:00:05.962   [NR] latest: 3.0.2
2023-05-03 12:00:05.962   [NR] next: 3.1.0-beta.2
2023-05-03 12:00:05.962   [NR] v1-maintenance: 1.3.7
2023-05-03 12:00:05.962   [NR] v2-maintenance: 2.2.3
2023-05-03 12:00:05.962   [NR] npm dist-tag: 4
2023-05-03 12:00:05.962   [NR] 3.0.2 | latest
2023-05-03 12:00:05.962   [NR] cv: 3.0.2 / 3
2023-05-03 12:00:05.962   [NR] 3.0.2
2023-05-03 12:00:05.962   [NR] 3
2023-05-03 12:00:05.962   [NR] 3
2023-05-03 12:00:05.962   [NR] 1
2023-05-03 12:00:05.962   [NR] cv: 3.0.2 / 3 = 1
2023-05-03 12:00:05.962   [NR] 3.1.0-beta.2 | next
2023-05-03 12:00:05.962   [NR] cv: 3.1.0-beta.2 / 3
2023-05-03 12:00:05.962   [NR] 3.1.0-beta.2
2023-05-03 12:00:05.962   [NR] 3
2023-05-03 12:00:05.962   [NR] 4
2023-05-03 12:00:05.962   [NR] 1
2023-05-03 12:00:05.962   [NR] cv: 3.1.0-beta.2 / 3 = 1
2023-05-03 12:00:05.962   [NR] 3.1.0-beta.2 ? 3.0.2
2023-05-03 12:00:05.962   [NR] 3.1.0-beta.2
2023-05-03 12:00:05.962   [NR] 3.0.2
2023-05-03 12:00:05.962   [NR] 4
2023-05-03 12:00:05.962   [NR] 1
2023-05-03 12:00:05.962   [NR] 1.3.7 | v1-maintenance
2023-05-03 12:00:05.962   [NR] cv: 1.3.7 / 3
2023-05-03 12:00:05.962   [NR] 1.3.7
2023-05-03 12:00:05.962   [NR] 3
2023-05-03 12:00:05.962   [NR] 3
2023-05-03 12:00:05.962   [NR] -1
2023-05-03 12:00:05.962   [NR] cv: 1.3.7 / 3 = -1
2023-05-03 12:00:05.962   [NR] 2.2.3 | v2-maintenance
2023-05-03 12:00:05.962   [NR] cv: 2.2.3 / 3
2023-05-03 12:00:05.962   [NR] 2.2.3
2023-05-03 12:00:05.962   [NR] 3
2023-05-03 12:00:05.962   [NR] 3
2023-05-03 12:00:05.962   [NR] -1
2023-05-03 12:00:05.962   [NR] cv: 2.2.3 / 3 = -1
2023-05-03 12:00:05.962   [NR] red_versions: 2
2023-05-03 12:00:05.962   [NR] 3.0.1
2023-05-03 12:00:05.962   [NR] 3.0.1
2023-05-03 12:00:05.962   [NR] cv: 3.0.1 / 3
2023-05-03 12:00:05.962   [NR] 3.0.1
2023-05-03 12:00:05.962   [NR] 3
2023-05-03 12:00:05.962   [NR] 3
2023-05-03 12:00:05.962   [NR] 1
2023-05-03 12:00:05.962   [NR] cv: 3.0.1 / 3 = 1
2023-05-03 12:00:05.962   [NR] 3.0.1 ? 3.0.2
2023-05-03 12:00:05.962   [NR] 3.0.1
2023-05-03 12:00:05.962   [NR] 3.0.2
2023-05-03 12:00:05.962   [NR] 3
2023-05-03 12:00:05.962   [NR] -1
2023-05-03 12:00:05.962   [NR]  ? 3.1.0-beta.2
2023-05-03 12:00:05.962   [NR] 3.0.1 / 
2023-05-03 12:00:05.962   [NR] 3.0.2 / latest
2023-05-03 12:00:05.962   [NR] 3.1.0-beta.2 / next
2023-05-03 12:00:06.919   [NR] C:\Users\Christian\AppData\Roaming\npm
2023-05-03 12:00:07.983   [NR] C:\Users\Christian\AppData\Roaming\npm
2023-05-03 12:00:07.983   [NR] `-- (empty)
2023-05-03 12:00:07.983   [NR] 
2023-05-03 12:00:07.983   [NR] PrepareNodeVersionSelectionPage
2023-05-03 12:00:07.983   [NR] PrepareNodeVersionSelectionPage1
2023-05-03 12:00:07.983   [NR] PrepareNodeVersionSelectionPage2
2023-05-03 12:00:07.983   [NR] 18.16.0
2023-05-03 12:00:07.983   [NR] 16
2023-05-03 12:00:07.983   [NR] 3
2023-05-03 12:00:07.983   [NR] 1
2023-05-03 12:00:07.983   [NR] 16.20.0
2023-05-03 12:00:07.983   [NR] 18.16.0
2023-05-03 12:00:07.983   [NR] 16.20.0
2023-05-03 12:00:07.983   [NR] 3
2023-05-03 12:00:07.983   [NR] 1
2023-05-03 12:00:07.983   [NR] 18.16.0
2023-05-03 12:00:07.983   [NR] 18.16.0
2023-05-03 12:00:07.983   [NR] 18.16.0
2023-05-03 12:00:07.983   [NR] 3
2023-05-03 12:00:07.983   [NR] 0
2023-05-03 12:00:07.983   [NR] 20.0.0
2023-05-03 12:00:07.983   [NR] 18.16.0
2023-05-03 12:00:07.983   [NR] 20.0.0
2023-05-03 12:00:07.983   [NR] 3
2023-05-03 12:00:07.983   [NR] -1
2023-05-03 12:00:07.983   Extracting temporary file: C:\Users\CHRIST~1\AppData\Local\Temp\is-93AE8.tmp\node-red-small.bmp
2023-05-03 12:00:07.999   [NR] 
2023-05-03 12:00:07.999   [NR] 3.1.0-beta.2
2023-05-03 12:00:07.999   [NR] 4
2023-05-03 12:00:07.999   [NR] -1
2023-05-03 12:00:07.999   [NR] 
2023-05-03 12:00:07.999   [NR] 3.0.2
2023-05-03 12:00:07.999   [NR] 3
2023-05-03 12:00:07.999   [NR] -1
2023-05-03 12:00:07.999   [NR] GetRED: 0
2023-05-03 12:00:07.999   [NR] 
2023-05-03 12:00:07.999   [NR] 3.0.1
2023-05-03 12:00:07.999   [NR] 3
2023-05-03 12:00:07.999   [NR] -1
2023-05-03 12:00:07.999   [NR] GetRED: 0
2023-05-03 12:00:08.978   [NR] undefined
2023-05-03 12:00:09.025   [NR] Python 3.9.1
2023-05-03 12:00:09.025   [NR] 3.9.1
2023-05-03 12:00:09.025   [NR] 3.10
2023-05-03 12:00:09.025   [NR] 3
2023-05-03 12:00:09.025   [NR] -1
2023-05-03 12:00:09.134   [NR] Result:= true
2023-05-03 12:00:41.481   [NR] GetRED: 0
2023-05-03 12:00:41.481   [NR] GetRED: 0
2023-05-03 12:00:52.789   [NR] GetRED: 0
2023-05-03 12:00:52.789   [NR] GetRED: 0
2023-05-03 12:00:53.630   [NR] GetRED: 0
2023-05-03 12:00:53.630   [NR] GetRED: 0
2023-05-03 12:00:53.718   [NR] GetRED: 0
2023-05-03 12:01:02.869   [NR] GetRED: 0
2023-05-03 12:01:02.869   [NR] GetRED: 0
2023-05-03 12:01:02.926   [NR] GetRED: 0
2023-05-03 12:01:08.999   [NR] GetRED: 0
2023-05-03 12:01:08.999   [NR] GetRED: 0
2023-05-03 12:01:09.062   [NR] GetRED: 0
2023-05-03 12:01:15.549   Found 0 files to register with RestartManager.
2023-05-03 12:01:15.564   Starting the installation process.
2023-05-03 12:01:15.564   Creating directory: C:\Program Files (x86)\Node-RED
2023-05-03 12:01:15.564   Directory for uninstall files: C:\Program Files (x86)\Node-RED
2023-05-03 12:01:15.564   Creating new uninstall log: C:\Program Files (x86)\Node-RED\unins000.dat
2023-05-03 12:01:15.564   -- File entry --
2023-05-03 12:01:15.564   Dest filename: C:\Program Files (x86)\Node-RED\unins000.exe
2023-05-03 12:01:15.581   Time stamp of our file: 2023-05-03 11:59:00.963
2023-05-03 12:01:15.581   Installing the file.
2023-05-03 12:01:15.581   Successfully installed the file.
2023-05-03 12:01:15.581   -- File entry --
2023-05-03 12:01:15.581   Dest filename: C:\Users\CHRIST~1\AppData\Local\Temp\is-93AE8.tmp\setup_loop.bat
2023-05-03 12:01:15.581   Time stamp of our file: 2023-04-28 12:10:32.000
2023-05-03 12:01:15.581   Installing the file.
2023-05-03 12:01:15.581   Successfully installed the file.
2023-05-03 12:01:15.581   -- File entry --
2023-05-03 12:01:15.581   Dest filename: C:\Program Files (x86)\Node-RED\red.ico
2023-05-03 12:01:15.581   Time stamp of our file: 2023-04-28 12:10:34.000
2023-05-03 12:01:15.581   Installing the file.
2023-05-03 12:01:15.581   Successfully installed the file.
2023-05-03 12:01:15.581   Saving uninstall information.
2023-05-03 12:01:15.581   Creating new uninstall key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\{70D435D8-542E-4087-8E1C-D313404C7E9D}_is1
2023-05-03 12:01:15.581   Writing uninstall key values.
2023-05-03 12:01:15.581   Detected previous non administrative install? No
2023-05-03 12:01:15.581   Detected previous administrative 64-bit install? No
2023-05-03 12:01:15.581   Installation process succeeded.
2023-05-03 12:01:15.596   -- Run entry --
2023-05-03 12:01:15.596   Run as: Current user
2023-05-03 12:01:15.596   Type: Exec
2023-05-03 12:01:15.596   Filename: C:\Users\CHRIST~1\AppData\Local\Temp\is-93AE8.tmp\python_installer.exe
2023-05-03 12:01:15.596   Parameters: /quiet InstallAllUsers=1 PrependPath=1 Include_test=0 Include_launcher=0
2023-05-03 12:01:15.596   Exception message:
2023-05-03 12:01:15.596   Message box (OK):
                          Unable to execute file:
                          C:\Users\CHRIST~1\AppData\Local\Temp\is-93AE8.tmp\python_installer.exe
                          
                          CreateProcess failed; code 2.
                          Le fichier spécifié est introuvable.
2023-05-03 12:31:33.569   User chose OK.
2023-05-03 12:31:33.616   [NR] Python 3.9.1
2023-05-03 12:31:33.616   [NR] 3.9.1
2023-05-03 12:31:33.616   [NR] 3.10
2023-05-03 12:31:33.616   [NR] 3
2023-05-03 12:31:33.616   [NR] -1
2023-05-03 12:31:33.631   Need to restart Windows? No
2023-05-03 12:32:04.257   Deinitializing Setup.
2023-05-03 12:32:04.278   Log closed.

@SuperNinja
Looks like you fell over a bug in the installer: There was a guard missing that had to ensure that Python is only installed when you as well triggered a change of Node.js.
A new beta.3 has just been released that should address this. Would be great if you could test it & report back!
Thank you for your support improving the installer!

It may be in here somewhere but I cannot find it, how much of the installation can be installed in a selected location (Not default)?

In the current beta.3, a selected location / custom path may be defined for new installation setups, under Configuration / Installation path. Just double click on the label to change the default setting.

EDIT & Heads-Up: Please take the beta.4 for your tests. Just fixed a bug that created a failure when trying to install into C:\Program Files.

2 Likes

Thank you

it's ok for me with Beta 4 :+1:

Status update!

We moved the installer under the umbrella of the the Node-RED orga. :tada:
Its latest version - currently still beta - can be found here.

4 Likes

I have tried Beta 4 and Beta 6 Windows installer but the result is the same. When I try to start the new instance using the desktop shortcut, I see the NR window open for a second then close.

When running the installer, it finds my global installation of NR that uses port 1880. I then click the + sign to add a new local version. I have tried leaving the port setting as Default and have also defined specific ports such as 1882 and 1885, both ports are available.

I think the new install is using the settings of the global install on port 1880. When I run, node.exe red.js, in the new instance folder(C:\Program Files (x86)\Node-RED\node_modules\node-red), I can see it is using the global instance path and port 1880 which is already running as a service, so the new instance stops.

Thanks.

Hi @DaveO !
Welcome to this forum & thank you for testing the Windows installer.

I can confirm the issue.
Rather than to the ports it looks like being related to the --userDir (and given privileges) the installer assigns for Custom Path installations; it yet seems to only affect installations into the Program Files folder.
I'll make up my mind how to fix this...

Program Files is a privileged folder structure that requires local admin rights to update.

I know.
Data managed has to be placed into AppData.
Do you have a clever idea how organize this reliably in case of more-than-one - installations?

Well, probably best to follow a similar line to my alternate installer?

That installs node-red itself into a "master" folder and makes the userDir a sub-folder called "data". Some variation on that should work. Or you could go for a top-level "node-red" folder and put the instances beneath that. or some combination of those.

Hi @ralphwetzel thanks for the quick reply. I changed the install path to C:\Node-RED and it works perfectly now. Thanks for the great work you are doing!
Dave

One additional note regarding the install to C:\Node-RED folder. To install nodes from the Palette Manager, I had to run the Node-RED shortcut as Administrator.