fresc81 / node-winreg

node module that provides access to the Windows Registry through the REG commandline tool
210 stars 61 forks source link

Version 1.2.5 breaks on complex registry value #63

Open vilicvane opened 1 year ago

vilicvane commented 1 year ago

I am setting REG_SZ with "C:\Users\vilicvane\AppData\Roaming\npm\node_modules\desktop-matters\node_modules\startup-run\bin\hideexec.exe" "C:\Program Files\nodejs\node.exe" "C:\Users\vilicvane\AppData\Roaming\npm\node_modules\desktop-matters\node_modules\startup-run\bld\daemon\main.js" "{\"name\":\"desktop-matters\",\"command\":\"C:\\Program Files\\nodejs\\node.exe\",\"args\":[\"C:\\Users\\vilicvane\\AppData\\Roaming\\npm\\node_modules\\desktop-matters\\bld\\cli\\main.js\",\"--startup\"],\"cwd\":\"C:\\Users\\vilicvane\",\"env\":{},\"log\":\"C:\\Users\\vilicvane\\desktop-matters.log\",\"respawn\":1000}", and with 1.2.5 it no longer works.

Possibly due to the shell: false update.

rfricz commented 1 year ago

The new shell: false setting breaks /d argument values of reg.exe add command that contain double quotes or spaces. IMO the value of this flag should be configurable in Registry.prototype.set method.