wflohr
Posts: 9
Joined: Tue Aug 09, 2005 7:30 am

Not overwriting or delete registry key on update

Hello!

As described in a former post http://www.advancedinstaller.com/forums ... .php?t=971 this method doesn't work for REG_BINARY values.

In the MSI installer logfile i get the following message.. (sorry it's in german) but I think the problem is the duplicate #x#x in the key value.

Any ideas? - thanks in advance!,
Wolfgang

MSI (s) (F4:00) [15:22:31:065]: Executing op: RegAddValue(Name=P2,Value=#x#x654243514041085158,)
WriteRegistryValues: Schlüssel: \Software\Softwarelandschaft\slGenerator, Name: P2, Wert: #x#x654243514041085158
MSI (s) (F4:00) [15:22:31:065]: Note: 1: 1406 2: P2 3: Software\Softwarelandschaft\slGenerator
Fehler 1406. Wert P2 konnte nicht unter den Schlüssel \Software\Softwarelandschaft\slGenerator geschrieben werden. Systemfehler . Überprüfen Sie, ob Sie ausreichende Zugriffsrechte auf diesen Schlüssel besitzen, oder setzen Sie sich mit dem Supportpersonal in Verbindung.
MSI (s) (F4:00) [15:22:33:959]: Produkt: slGenerator -- Fehler 1406. Wert P2 konnte nicht unter den Schlüssel \Software\Softwarelandschaft\slGenerator geschrieben werden. Systemfehler . Überprüfen Sie, ob Sie ausreichende Zugriffsrechte auf diesen Schlüssel besitzen, oder setzen Sie sich mit dem Supportpersonal in Verbindung.
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

The problem is indeed the duplicate "#x" prefix in the value data. In the Registry table inside the MSI database, the "#x" prefix attached to the "Value" field causes the value to be interpreted and stored as a hexadecimal value (REG_BINARY). Since "#x654243514041085158" cannot be interpreted as a hex value, error 1406 occurs.

The problem is that the value of the Property that holds the REG_BINARY data already contains the "#x" prefix. Therefore, in the Registry page in AI, set the "Type" for the registry value to "String" (in the "Edit Registry Entry" dialog). Choosing "Binary" will cause another "#x" prefix to be added - thus causing the error to appear.

Whenever you need to perform an initialization (in a "Property Set with Formatted" Custom Action for example), use the "#x" prefix. The registry value will be interpreted at install time based on this prefix.

Hope this helps.

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Feature Requests”