Announcement

Collapse
No announcement yet.

Custom bootstrapper exe is not running any lua script after g_CreateExtractPath call

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Custom bootstrapper exe is not running any lua script after g_CreateExtractPath call

    I built an msi installer package that runs and installs fine. However I'm having trouble getting the bootstrapper exe to run to completion. There is a call into the global functions script near the top of my mainscript.lua:

    Code:
    -- Create unique extract path.
    strInstallerPathExtracted = g_CreateExtractPath(strProductCode,strPackageCode);
    And inside is a line:

    Code:
    Folder.Create(strDownloadPath);
    When this line executes I see no further logging messages in my script and the "Windows Installer" help message appears



    I checked and the strDownloadPath folder gets created with the MSI in it (C:\Users\sen\AppData\Roaming\Downloaded Installations\{B01F3FC9-27EF-482E-BFA1-E55F3E80967
    7})

    Why would I not see a log entry that I added immediately after Folder.Create() in the global functions? What can I try to do to resolve this? Please help, this is urgent. I have attached my project for reference msi-project.zip.

  • #2
    I cannot explain why you would see this. I built your project, and executed the resulting installer. Here is what I got in the log file:

    Code:
    [03/01/2016 23:49:15] Success	Bootstrap started: C:\Users\Ulrich Peters\ProduceProClient.exe
    [03/01/2016 23:49:15] Success	Bootstrap engine version: 2.2.1000.0
    [03/01/2016 23:49:16] Success	START: Boostrapper main script.
    [03/01/2016 23:49:16] Notice	Install Product Code: {B01F3FC9-27EF-482E-BFA1-E55F3E809677}
    [03/01/2016 23:49:16] Notice	Install Package Code: {1816ABDB-1EE2-42A6-8C9E-699E8D8FF677}
    [03/01/2016 23:49:16] Notice	Install Product Name: Produce Pro Client
    [03/01/2016 23:49:16] Notice	Install Product Version: 1.99
    [03/01/2016 23:49:16] HERE 5!
    [03/01/2016 23:49:16] C:\Users\Ulrich Peters\AppData\Roaming\Downloaded Installations\{B01F3FC9-27EF-482E-BFA1-E55F3E809677}
    [03/01/2016 23:49:16] global6
    [03/01/2016 23:49:16] global7
    [03/01/2016 23:49:16] nError == 0
    [03/01/2016 23:49:16] Installing for the first time
    [03/01/2016 23:49:16] Notice	MSI extracted path: C:\Users\Ulrich Peters\AppData\Roaming\Downloaded Installations\{B01F3FC9-27EF-482E-BFA1-E55F3E809677}\{1816ABDB-1EE2-42A6-8C9E-699E8D8FF677}.msi
    [03/01/2016 23:49:16] Error		Script: _global_functions.lua, [85]: local strPortNumber = Registry.GetValue(HKEY_CURRENT_USER, "Software\\Produce Pro\\Client\\Sessions\\ppro", "PortNumber", false); (1605)
    [03/01/2016 23:49:16] Error		Script: _global_functions.lua, [89]: strPortNumber = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Produce Pro\\Client\\Sessions\\ppro", "PortNumber", false); (1605)
    [03/01/2016 23:49:16] Error		Script: _global_functions.lua, [99]: local strHostName = Registry.GetValue(HKEY_CURRENT_USER, "Software\\Produce Pro\\Client\\Sessions\\ppro", "HostName", false); (1605)
    [03/01/2016 23:49:16] Error		Script: _global_functions.lua, [103]: strHostName = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Produce Pro\\Client\\Sessions\\ppro", "HostName", false); (1605)
    [03/01/2016 23:49:16] Error		Script: _global_functions.lua, [110]: local strPrinterName = Registry.GetValue(HKEY_CURRENT_USER, "Software\\Produce Pro\\Client\\Sessions\\ppro", "Printer", false); (1605)
    [03/01/2016 23:49:16] Error		Script: _global_functions.lua, [114]: strPrinterName = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Produce Pro\\Client\\Sessions\\ppro", "Printer", false); (1605)
    [03/01/2016 23:49:16] Error		Script: _global_functions.lua, [121]: local strSilentUpdates = Registry.GetValue(HKEY_CURRENT_USER, "Software\\Produce Pro\\Client\\WinSparkle", "SilentUpdates", false); (1605)
    [03/01/2016 23:49:16] Trying to remove old Produce Pro Client.
    [03/01/2016 23:49:17] Finished removing old Produce Pro Client.
    [03/01/2016 23:49:17] Notice	Launch MSI setup.
    [03/01/2016 23:49:17] Notice	-i "C:\Users\Ulrich Peters\AppData\Roaming\Downloaded Installations\{B01F3FC9-27EF-482E-BFA1-E55F3E809677}\{1816ABDB-1EE2-42A6-8C9E-699E8D8FF677}.msi"
    [03/01/2016 23:49:28] Notice	MSI setup return code: 1602
    [03/01/2016 23:49:28] Success	END: Boostrapper main script.
    You are using 2.1.1020.0, while I am using 2.2.1000.0. Please download the current evaluation version, and rebuild your project with it on a different computer, then test again on the same computer where you see the error. Perhaps you get the same result as I did above, which could mean that there might have been a correction to an issue which this previous version of MSI Factory had.

    Ulrich

    Comment


    • #3
      OK, I tried with 2.2.1000.0 on the same machine and it failed in the same way. I tried with 2.1.1020.0 and 2.2.1000.0 on a new machine, and both worked without problems. So something has become corrupt or broken on my machine that I've been using to build the bootstrapper. If you have ideas on what I might look for to fix this, let me know. As a work-around I'll work on another machine for now. One thing that might be a clue, when I first build the bootstrapper on the problem machine, there was an error message, then I immediately did a second build and got no error message. This was the message:

      Indigo Rose MSI Bootstrapper

      Copyright (c) 2015 Indigo Rose Corporation - www.indigorose.com

      Initialize folders...

      Loading configuration file...

      Copy setup executable stub...

      Writing Version Resources...

      Adding bootstrapper execution level manifest...

      Adding files...

      C:\Users\sen\workspace\ProduceProClient\MSI Factory\Build Files\mainscript.lua.tmp

      C:\Users\sen\workspace\ProduceProClient\MSI Factory\Build Files\_global_functions.lua.tmp

      C:\Users\sen\workspace\ProduceProClient\MSI Factory\Output\ProduceProClient.msi

      Adding data marker...

      Adding manifest file...

      ERROR: Failed to open file: C:\Users\sen\workspace\ProduceProClient\MSI Factory\Output\ProduceProClient.exe

      Cleaning up temporary files...

      Bootstrap build failed: 7

      Error 1011: IRMakeBootstrap.exe returned error: 7
      Deleting temporary files

      Build FAILED! Error: 1011 - Error executing pre/post build step
      Thank you for the quick reply.

      Comment


      • #4
        OK, I figured out the problem. This was difficult to find, because for some reason my lua Application.writeToLogFile() calls stopped logging anything after the g_CreateExtractPath() call. But apparently the script was continuing past that point.

        I figured the problem out by ripping out sections of my lua script until it worked. Basically, one of my registry searches for a printer name hit a match on my main dev computer. It didn't break for you because you did not have the same registry setting. These lines in my script:

        Code:
        	strPrinterName = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Produce Pro\\Client\\Sessions\\ppro", "Printer", false);
        	if (strPrinterName ~= "") then
        		strCommandLine = strCommandLine.." PROP_PRINTER="..strPrinterName;
        	end
        The printer name ended up being "CutePDF Writer". The space in the printer name caused the msiexec command line to fail. I take it that I need to somehow put quotes around the entire command line argument? That should solve the issue :yes

        Comment

        Working...
        X