07-24-2023, 04:25 AM
I am trying to write to the Registry using Jscript.
I am able to do this [command][1] for REG_SZ, but it doesn't support REG_MULTI_SZ.
How can I write to the Registry using Jscript when the Registry I am trying to change is of type REG_MULTI_SZ?
<!-- language: lang-js -->
var WshShell = Wscript.CreateObject("Wscript.Shell");
var regPath = "HKLM\\SOFTWARE\\PROGRAM\\ProgramName";
var newVal = "com.settings=changed";
var regType = "REG_SZ";
WshShell.RegWrite (regPath, newVal, regType);
[1]:
I am able to do this [command][1] for REG_SZ, but it doesn't support REG_MULTI_SZ.
How can I write to the Registry using Jscript when the Registry I am trying to change is of type REG_MULTI_SZ?
<!-- language: lang-js -->
var WshShell = Wscript.CreateObject("Wscript.Shell");
var regPath = "HKLM\\SOFTWARE\\PROGRAM\\ProgramName";
var newVal = "com.settings=changed";
var regType = "REG_SZ";
WshShell.RegWrite (regPath, newVal, regType);
[1]:
[To see links please register here]