Ryu
7 years agoContributor
Solved
SetOption is changing a REG_DWORD to a REG_SZ
I am at least a little familiar with coding, but I haven't really done much of it in 10-ish years, so I am very rusty. When running the following code snippet (I'm using python) in a test, instead of just changing the subkey to the selected value, it also changes the subkey type from REG_DWORD to REG_SZ. Can someone please tell me what am I doing wrong, here? Thanks!
def registryChange():
key = Storages.Registry("SOFTWARE\\WOW6432Node\\folder", HKEY_LOCAL_MACHINE)
key.SetOption("SyslogToFile", "1")
Never mind - I figured it out. I need to use key.SetOption("SyslogToFile", 1) instead of key.SetOption("SyslogToFile", "1"). :)