Code: Select all
Function WriteReg()
Dim objShell
Set objShell = CreateObject("WScript.Shell")
Dim pathToKey, productName
pathToKey = "HKLM\Software\"
productName = Session.Property("ProductName")
objShell.RegWrite pathToKey + productName + "\MyKey", 1, "REG_BINARY"
MsGBox("Written 1 in "+pathToKey + productName + "\MyKey")
End Function
After app. removing the updated registry value will be removed, and user's system will die.Advanced Installer User Guide wrote: How do I update an existing registry value?
Answer
Go to the Registry page, by selecting it in the left-side panel. Select the Registry hive tree by clicking in it.
Use the [ New Key ] toolbar button to recreate the required registry path.
Use the [ New Value ] toolbar button to create the required registry value.
If the registry keys and the value already exist, the value's data will be modified. If not, the keys and the value will be created.