winapi
winapi copied to clipboard
regkey:set_value only writes part of string
Simple sample to illustrate the issue with only part of strings written.
require "winapi"
local key, err = winapi.open_reg_key([[HKEY_USERS\S-1-5-21-3530694592-716403133-1610703870-44512\Software\Microsoft\Windows\CurrentVersion\Policies\System]], true)
if not key then return print('bad key',err) end
local str= [[c:\photo\img_4826.jpg]]
key:set_value('wallpaper', str, winapi.REG_SZ)
print(key:get_value('wallpaper', winapi.REG_SZ))