Installer hangs on reading registry entry

Got a problem you cannot solve? Try here.
Uthoroc
Posts: 16
Joined: Wed Aug 22, 2007 6:49 am
Location: Siegen, Germany
Contact:

Installer hangs on reading registry entry

Postby Uthoroc » Fri Nov 20, 2009 10:03 am

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
Ralf Schemmann
ProFantasy Software Ltd
General Manager

neillans
Posts: 536
Joined: Sat Nov 04, 2006 6:21 am
Location: Scottish Borders, UK
Contact:

Postby neillans » Sun Nov 22, 2009 5:29 pm

What version of InstallAware is this with?
Andy Neillans

Uthoroc
Posts: 16
Joined: Wed Aug 22, 2007 6:49 am
Location: Siegen, Germany
Contact:

Postby Uthoroc » Wed Nov 25, 2009 4:13 am

Install Aware 9
Ralf Schemmann

ProFantasy Software Ltd

General Manager

Sean Flook
Posts: 12
Joined: Thu May 13, 2010 1:52 am

Re: Installer hangs on reading registry entry

Postby Sean Flook » Tue Dec 07, 2010 5:58 am

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

sinan
Site Admin
Posts: 1020
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Re: Installer hangs on reading registry entry

Postby sinan » Tue Dec 07, 2010 7:52 am

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.

Sean Flook
Posts: 12
Joined: Thu May 13, 2010 1:52 am

Re: Installer hangs on reading registry entry

Postby Sean Flook » Wed Dec 08, 2010 4:10 am

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

sinan
Site Admin
Posts: 1020
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Re: Installer hangs on reading registry entry

Postby sinan » Wed Dec 08, 2010 5:10 am

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.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 27 guests