Skip to content

Error at SET if space in key or value #65

@tripower

Description

@tripower

Hello

we get the following ERROR if a space is in the key or value of the set method
ProcessUncleanExitError: ADD command exited with code 1:
FEHLER: Ungültige Syntax.
Geben Sie "REG ADD /?" ein, um die Syntax anzuzeigen.

method call:
key.set("URL Protocol", WinReg.REG_SZ, '', (err)=> {
});

or

key2.set(WinReg.DEFAULT_VALUE, WinReg.REG_SZ, '"ExeFileFolder\ExeFileName" "--deeplink=%1"', (err)=> {
});

Info:
it works on CMD
`
C:>reg add HKCU\SOFTWARE\Classes\testKB /v "URL Protocol" /t REG_SZ /d "" /f
Der Vorgang wurde erfolgreich beendet.

C:>reg query HKCU\SOFTWARE\Classes\testKB /v "URL Protocol"
HKEY_CURRENT_USER\SOFTWARE\Classes\testKB
URL Protocol REG_SZ
`

update 1:
key.set("\"URL Protocol\"",..
results in exteme cpu usage and forever running thread

update 2:
version 1.2.4 works!!! (with pure NodeJS and in my electron v18 app)
version 1.2.5 also NOT ok if I took the set method from 1.2.4 (very strange)
so I do not close the issue because 1.2.5 should also work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions