Why is the flow file in AppData\Roaming\SPB_Data on my Windows PC?

I found that the ".node-red" folder on one of my Windows PC is in: "C:\Users\xxxx\AppData\Roaming\SPB_Data" instead of the normal "C:\Users\xxxx".

I don't understand why this has happened.
Can I change this location to "C:\Users\xxxx"?

This is what I see when starting node-red:

  • [info] Node-RED version: v1.0.2
  • [info] Node.js version: v13.1.0
  • [info] Windows_NT 10.0.18362 x64 LE
  • [info] Loading palette nodes
  • [info] Settings file : C:\Users\xxxx\AppData\Roaming\SPB_Data.node-red\settings.js
  • [info] Context store : 'default' [module=memory]
  • [info] User directory : C:\Users\xxxx\AppData\Roaming\SPB_Data.node-red
  • [warn] Projects disabled : editorTheme.projects.enabled=false
  • [info] Flows file : C:\Users\xxxx\AppData\Roaming\SPB_Data.node-red\flows_PC-xxxx.json

Maybe some environment variables have been changed on your system.

I would check the values of HOME, HOMEPATH and USERPROFILE.

Thanks for your suggestion!
Indeed, the HOME variable is: C:\Users\xxx\AppData\Roaming\SPB_Data.
I have read that this variable is not set by default.
I have no idea which tool has set this variable.

By default it should be set by the OS.
I think you can just delete the entry in your environment dialog, logout/login and it should be working again.

As another solution, you can explicitly pass the location of the workspace when starting Node-RED. Just pass the path with the parameter -u path/to/workspace.

I deleted the HOME enviroment variable and restarted Node-RED.
Now indeed it uses the default path.

Thank you very much for your explanation and help!

You're welcome.

But you should investigate which program had changed that variable so it won't happen again.

Yes indeed.

The oldest created folder in "C:\Users\xxxx\AppData\Roaming\SPB_Data" is "cdssetup".
This folder is created by Orcad in 2017. So Orcad is a good candidate.
I just checked that Orcad is still working after removing the HOME variable.
I will keep an eye on the HOME variable.