Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Upgrade InstallScript by basic MSI


10 replies to this topic

ashlega

ashlega
  • Members
  • 2 posts

Posted 13 January 2005 - 13:11

Hello,

I have a problem when major upgrading a rpoduct installed with InstallScript MSI using a basic MSI setup. Everything works fine however there are 2 records int he "add/remove" window after the upgrade is done. I've tested it with a quite simple setup and it works just the same way:

If a product is installed with InstallScript MSI and then major upgraded via basic MSI setup there are 2 records in the "Add/Remove" window.

As far as I can see removal works(old files are removed correctly)

InstallShiled 8, service pack 2

Is there a workaround?

Thank you
Alex


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 14 January 2005 - 17:49

There are known problems when performing a major upgrade of a InstallScript MSI project. The InstallScript portion may roll back (and therefore not removing the Add/Remove entry)

danielxu22

danielxu22
  • Full Members
  • 27 posts

Posted 15 November 2005 - 03:13

Hi, Stefan,

Do you have any idea to solve this problem. Because my custom want stand-alone MSI package. They want ****.MSI file for setup program.

Dose the stand-alone package that "MSIEXEC.EXE" be generated only by Basic MSI Project?

InstallShield 10.5 Premier Edtion

BR,
Daniel

Edited by danielxu22, 15 November 2005 - 03:21.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 15 November 2005 - 11:44

"InstallScript MSI" projects always require setup.exe.
"Basic MSI" project can be created as a pure .msi file that doesn't need setup.exe.

danielxu22

danielxu22
  • Full Members
  • 27 posts

Posted 17 November 2005 - 03:02

QUOTE (ashlega @ 2005-01-13 13:11)
Hello,

I have a problem when major upgrading a rpoduct installed with InstallScript MSI using a basic MSI setup. Everything works fine however there are 2 records int he "add/remove" window after the upgrade is done. I've tested it with a quite simple setup and it works just the same way:

If a product is installed with InstallScript MSI and then major upgraded via basic MSI setup there are 2 records in the "Add/Remove" window.

As far as I can see removal works(old files are removed correctly)

InstallShiled 8, service pack 2

Is there a workaround?

Thank you
Alex

Hi, Stefan,

Do you have any idea to solve this problem above. I fell in the same problem. Because my custom want stand-alone MSI package. They want ****.MSI file for setup program.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 17 November 2005 - 22:54

As I said above (maybe not clear enough): don't use InstallScript MSI but use Basic MSI instead. (I assume you are using InstallScript MSI today because you are posting in the InstallScript MSI section of the forum)

danielxu22

danielxu22
  • Full Members
  • 27 posts

Posted 18 November 2005 - 04:23

Thanks for your reply.

Unfortunately, our old version projects are both build in InstallScript MSI Project. sad.gif
I created new project of Basic MSI Project based on InstallShield Evaluation 11 Premier Edition. And the same thing happened. It could not upgrade from InstallScript MSI Project to Basic MSI Project. There are two items in the ARP.

BR,
Daniel

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 18 November 2005 - 09:56

You could try a custom action (called from the UI sequence) to uninstall the old version, or have a launcher exe uninstall it.

danielxu22

danielxu22
  • Full Members
  • 27 posts

Posted 22 November 2005 - 12:14

Hi, Stefan,

Thanks for your help.
I think I settle this problem. I create Custom Action named FindPreVerProduct to find previous version product and remove it.

Install UI Sequence: After FindRelatedProducts
Install UI Condition: ACTIONpROPERTY

Function is here:
QUOTE
function FindPreVerProduct(hMSI) 
STRING szActionProperty, svDest, szSubKey, szValue, szValueName, szCmd, szProgram;
NUMBER nResult, nSize, nEndPos, nvSize, nvType;
begin             
    nSize = 128;
    nResult = MsiGetProperty(ISMSI_HANDLE, "ACTIONPROPERTY", szActionProperty, nSize);
   
    if (ERROR_SUCCESS = nResult) then
        nEndPos = StrFind(szActionProperty, ";");

        if (nEndPos < 0) then //If ActionProperty contains only value of product codes. Copy all of the string.
            CopyBytes(svDest, 0, szActionProperty, 0, StrLength(szActionProperty));
        else // Else copy the string before first ";".
            CopyBytes(svDest, 0, szActionProperty, 0, nEndPos);
        endif;
       
       
        // Silent uninstall InstallShield package
        // HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\[InstallShiels_]{YOUR_GUID}
        // Get the Value of the "UninstallString" (....\IDriver.exe /M{YOUR_GUID})
        // append to that Value /uninst --> \IDriver.exe /M{YOUR_GUID} /uninst

        szValueName = "UninstallString";
        nvType = REGDB_STRING;
    RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
    szSubKey = "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\InstallShield_" + svDest;
    nResult = RegDBKeyExist(szSubKey);
    if ( nResult = 1 ) then 
  RegDBGetKeyValueEx (szSubKey, szValueName, nvType, szValue, nvSize);

  nEndPos = StrFind(szValue, " ");
      CopyBytes(szProgram, 0, szValue, 0, nEndPos);
           
      CopyBytes(szCmd, 0, szValue, (nEndPos + 1), (StrLength(szValue) - nEndPos));
     
      szCmd = szCmd + "/uninst";
 
  LaunchAppAndWait(szProgram, szCmd, WAIT);
    endif;
    endif;
end;


And then, I found another problem. It is InstallScript Engine Missing.

user posted image

I'm looking for any useful information about it. I've downloaded 8x/9x/10x/10.5/11 InstallShieldScriptingEngine.msm, but it always shows InstallScript Engine is Older version.

user posted image

Do you have any idea to Merge ISScript.msi and Setup.msi (My installation)?

BR,
Daniel

danielxu22

danielxu22
  • Full Members
  • 27 posts

Posted 23 November 2005 - 11:04

Hi, Stefan,

Merge Module of InstallScripting Engine is okay, it is funny, I reinstall my compiler (InstallShield 10.5 Premier Edtion). Rebuild the project again, and it is okay now. No idea!

Another question:
I read the article of Multi-Language MSI Packages without Setup.exe Launcher:
http://www.installsi...dlang/index.htm
And I followed setps to merge multi-language msi installation. I will get the error message of "Error applying transforms. Verify that the specified transform paths are valid".

I use Orca to modify the seutp.msi, remove "0,", save, and run the msi file. I think I miss something.

I have to use "msiexec /i product.msi TRANSFORMS=1031.mst" to setup in other language dialog.

BTW, do you know how to uninstall with maintenance dialog when I click the Remove Button in the ARP of Control Panel? I mean I want to add a maintenance dialog in the User Interface sequence of the project.

BR,
Daniel

Edited by danielxu22, 23 November 2005 - 11:08.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 26 November 2005 - 11:33

That article doesn't apply to InstallScript MSI projects because they use an external UI that is driven by InstallScript, not by Windows Installer.

The "Remove" button in ARP runs uninstall in BAsic UI mode, which means that the UI sequence is completely bypassed. You could disable the Repair buton and force uninstall through Modify -> Select Remove on MaintenanceWelcome dialog.