We've run into a strange problem with our latest software update and a very few users.
Our update installer checks for a serial number which is written by the main install into the windows registry (a string variable). The update uses the "Read Registry" command to get the string into a variable (SERIALNUM).
Now a few of our users reported the installer hanging during install. We've found out that it happens on reading the registry. Checking for their serial number in the registry, it turns out, it doesn't contain the serial number, but the string $SERIALNUM$.
Obviously, a previous installation must have fouled up and put the variable token string in there, instead of its content. But how is this even possible with the Write Registry command? Its Data field simply contains $SERIALNUM$. Note that this has only happened to in a couple instances.
We can fix the installer by using a different variable name (SERIALNUM2 instead of SERIALNUM), but how do we guard against this happening in the future? I obviously can't compare the string against $SERIALNUM$ since the code interpretes that as a variable token.
To reproduce, write a registry key manually, putting in $VARIABLE_NAME$ as the value. Try to read that key with the Read Registry command into the variable VARIABLE_NAME.
Thanks for you help,
Ralf Schemmann
Installer hangs on reading registry entry
-
- Posts: 12
- Joined: Thu May 13, 2010 1:52 am
Re: Installer hangs on reading registry entry
Hi All,
We are getting exactly the same issue, and I have managed to reproduce it with version 10. We have tried removing the entries from the Registry, but they are just written back as the variable name rather than the contents of the variable.
Is there a fix for this?
Sean
We are getting exactly the same issue, and I have managed to reproduce it with version 10. We have tried removing the entries from the Registry, but they are just written back as the variable name rather than the contents of the variable.
Is there a fix for this?
Sean
Re: Installer hangs on reading registry entry
Can you export the registry keys that exhibit this behavior so we can locally reproduce and fix?
Note that if you are assigning any variable to itself, you will cause an infinite loop since the variable will constantly try to resolve itself to itself. I'll add a feature request so such assignments are voided automatically.
So if that is the issue here, it doesn't matter which command the issue occurs in.
Note that if you are assigning any variable to itself, you will cause an infinite loop since the variable will constantly try to resolve itself to itself. I'll add a feature request so such assignments are voided automatically.
So if that is the issue here, it doesn't matter which command the issue occurs in.
-
- Posts: 12
- Joined: Thu May 13, 2010 1:52 am
Re: Installer hangs on reading registry entry
Hi Sinan,
Here are the registry entries that are causing the problem:
[HKEY_LOCAL_MACHINE\SOFTWARE\Aligned Assets\Symphony\Oracle]
"Instance"="$INSTANCE_NAME$"
"MigrationType"="$MIGRATION_TYPE$"
"Schema"="$SCHEMA_NAME$"
Also here are the lines where we write the values to the registry, where invalid data is being written to the registry:
Write Registry Key HKLM\SOFTWARE\Aligned Assets\Symphony\Oracle\Instance, $INSTANCE_NAME$ (permanent)
Write Registry Key HKLM\SOFTWARE\Aligned Assets\Symphony\Oracle\MigrationType, $MIGRATION_TYPE$ (permanent)
Write Registry Key HKLM\SOFTWARE\Aligned Assets\Symphony\Oracle\Schema, $SCHEMA_NAME$ (permanent)
And these are the lines where we read the entries from the registry, it is these that are causing the install to hang:
Read Registry Key HKLM\SOFTWARE\Aligned Assets\Symphony\Oracle\MigrationType into MIGRATION_TYPE
if Variable MIGRATION_TYPE Equals
Set Variable MIGRATION_TYPE to 0
end
Set Variable MIGRATION_SINGLE to FALSE
Set Variable MIGRATION_MULTI to FALSE
if Variable MIGRATION_TYPE Equals 0
Set Variable MIGRATION_SINGLE to TRUE
else
Set Variable MIGRATION_MULTI to TRUE
end
Read Registry Key HKLM\SOFTWARE\Aligned Assets\Symphony\Oracle\Instance into INSTANCE_NAME
Read Registry Key HKLM\SOFTWARE\Aligned Assets\Symphony\Oracle\Schema into SCHEMA_NAME
Cheers
Sean
Here are the registry entries that are causing the problem:
[HKEY_LOCAL_MACHINE\SOFTWARE\Aligned Assets\Symphony\Oracle]
"Instance"="$INSTANCE_NAME$"
"MigrationType"="$MIGRATION_TYPE$"
"Schema"="$SCHEMA_NAME$"
Also here are the lines where we write the values to the registry, where invalid data is being written to the registry:
Write Registry Key HKLM\SOFTWARE\Aligned Assets\Symphony\Oracle\Instance, $INSTANCE_NAME$ (permanent)
Write Registry Key HKLM\SOFTWARE\Aligned Assets\Symphony\Oracle\MigrationType, $MIGRATION_TYPE$ (permanent)
Write Registry Key HKLM\SOFTWARE\Aligned Assets\Symphony\Oracle\Schema, $SCHEMA_NAME$ (permanent)
And these are the lines where we read the entries from the registry, it is these that are causing the install to hang:
Read Registry Key HKLM\SOFTWARE\Aligned Assets\Symphony\Oracle\MigrationType into MIGRATION_TYPE
if Variable MIGRATION_TYPE Equals
Set Variable MIGRATION_TYPE to 0
end
Set Variable MIGRATION_SINGLE to FALSE
Set Variable MIGRATION_MULTI to FALSE
if Variable MIGRATION_TYPE Equals 0
Set Variable MIGRATION_SINGLE to TRUE
else
Set Variable MIGRATION_MULTI to TRUE
end
Read Registry Key HKLM\SOFTWARE\Aligned Assets\Symphony\Oracle\Instance into INSTANCE_NAME
Read Registry Key HKLM\SOFTWARE\Aligned Assets\Symphony\Oracle\Schema into SCHEMA_NAME
Cheers
Sean
Re: Installer hangs on reading registry entry
The issue is that you are assigning a variable to itself (even if only implicitly so). This has been resolved in the latest hotfix for InstallAware 10, the language now sets a variable to an empty string when it is assigned to itself in order to prevent an infinite loop.
Who is online
Users browsing this forum: No registered users and 43 guests