2

I have an Installscript installer. When I run it to update the product and parts of the product are running, then a reboot is required. -- This is ok.

It turned out that in case of a reboot all files are copied properly, but a configured self-registration does not take place -- not during installation, and not after the reboot.

I have checked the setup.ilg file and it tells me no news: files are copied, and self-registration appears to have been done.

When I close programs to prevent the necessity of a reboot or when I install the first time everything is ok.

Can you explain why the self-registration does not happen and what I can to to make it happen? Thank you!

  • Is this an MSI project? What does the log file say? – Stein Åsmul Oct 02 '18 at 22:44
  • No, its an InstallScript non-MSI project. I have not been able to create log files, that's why I came up with the `setup.ilg` file. – Reinhard Mayr Oct 08 '18 at 11:48
  • How are the files registered? Do you do so by Installscript, by enabling self-register for the file or by some bat file approach or similar? Why not prevent installation if files are open? `Setup.exe /s /f2"C:\Setup.log"` does not work for logging? [Setup.exe parameters](http://helpnet.flexerasoftware.com/installshield24helplib/installshield24helplib.htm#helplibrary/IHelpSetup_EXECmdLine.htm?). I have never tried the `/debuglog` paramter. – Stein Åsmul Oct 08 '18 at 19:15
  • The files are registered using the self-register flag of the InstallShield builder, no manual work added. > Why not prevent installation if files are open? How would I do that? I have also failed to produce reasonable logs. The `/s /f2` parameters give me only a brief summary with a ResultCode of 0. – Reinhard Mayr Jan 10 '19 at 15:40
  • If files fail to self-register there is generally a missing dependency. Try to run self-registration manually on the installed files and see if you get a meaningful error message. Otherwise a dependency checking session is in order. – Stein Åsmul Jan 10 '19 at 15:43
  • @SteinÅsmul, thank you for being so responsive! I can register the files manually, I can even re-run the setup after the reboot with the repair-function, and it works. It is just the problem when the reboot is required. – Reinhard Mayr Jan 10 '19 at 15:45
  • Any reason you can't use COM Extract at Build? This would eliminate the need for self-registration during installation. – Stein Åsmul Jan 10 '19 at 15:48
  • Added a screenshot below. – Stein Åsmul Jan 10 '19 at 15:58
  • COM Extract at Build is not available in a non-MSI InstallScript project. – Reinhard Mayr Jan 10 '19 at 16:47

2 Answers2

1

Stein asked me to weigh in on this.

Honestly, I haven't touched InstallScript project types since 2003. But I can take a guess at what is happening. I would imagine that the locked file causes MoveFileEx() to use the PendingFileRename operation pattern and that self registration isn't happening because the DLL isn't where it needs to be yet. Something would have to happen after the reboot to call LoadLibrary/DllRegisterServer() after reboot when the file is now in it's final resting place.

Why isn't this happening automatically? I have no idea. I did a quick google search and did find this article:

http://helpnet.installshield.com/installshield19helplib/Subsystems/installshield19langref/helplibrary/LangrefXCopyFile.htm

Unfortunately my corp firewall is blocking me from accessing it. Based on what Google showed me it sounds like you might have a workaround by using XCopy function to handle this.

Honestly though I only do MSI projects any more and you could also take a move out of that playbook by harvesting the COM meta data and applying the registry data yourself so everything lines up after the reboot.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
0

COM Extract at Build: Maybe try to enable COM Extract at Build to eliminate the need for self-registration? Please see this answer: Failed to run script function from Custom Actions. Essentially the option is hidden in the property page for each component.

Is this perhaps an old-style, legacy installer that is not MSI at all?

InstallShield communties:

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164