DECLARE Integer RegOpenKey IN Win32API Integer nHKey, String @cSubKey, Integer @nResult
DECLARE Integer RegSetValueEx IN Win32API Integer hKey, String lpszValueName, Integer dwReserved,;
Integer fdwType, String lpbData, Integer cbData
DECLARE Integer RegCloseKey IN Win32API
Integer nHKey
nresult=0
nmykey=-2147483646
&& HKEY_LOCAL_MACHINE
cmysubkey="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\TEST3.0"
if regopenkey(nmykey,@cmysubkey,@nresult)=0
cmyvaluename = "Contact"
cmyvalue="测试4.0 Support Department"
=RegSetValueEx(nresult,cmyvaluename,0,1,cmyvalue,LEN(cmyvalue))
RegCloseKey(nresult)
endif