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

want to run a custom action right at beginning


8 replies to this topic

LrngToFly

LrngToFly
  • Full Members
  • 15 posts

Posted 15 January 2008 - 22:35

Hello-

I am getting the message "Another verison of this product is already installed. Installation of this version cannot continue." I have tried many many things to get my kit to uninstall or upgrade the previous version. At this point, my new kit has a modified upgrade code. When I try to validate the upgrade against the old install kit, I get all sorts of errors (at least 100 of them) and I don't wish to figure out how to fix them all.

I would like to go a simple route: at the very start of the install, run a custom action of installscript code that asks the user if they would like to upgrade, and then run a:

szProgram = SystemFolder ^ "msiexec.exe";
szCmdLine = " /x{50A3F679-0740-4068-8771-624F655DFDBD} /qn";
if (LaunchAppAndWait(szProgram, szCmdLine, WAIT) < 0) then
Trace("iLink Pro not previously installed.");
nResult = 0;
else
Trace("iLink Pro uninstalled.");
nResult = 0;
endif;

to get the old package to uninstall. Should be easy enough- except that I can't figure out where in the sequence to put this so that it occurs prior to the automatic check for the previous version. Thanks much. AL

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 16 January 2008 - 11:00

Wyh not use a Major Upgrade instead of the custom action? Keep the UpgradeCode but change the ProductCode.
Or do you need to give the option to install both versions side-by-side?

LrngToFly

LrngToFly
  • Full Members
  • 15 posts

Posted 16 January 2008 - 15:34

Hi Steve, thanks for your reply. I've tried adding a Major upgrade and keeping the Upgrade code the same. I _still_ get that darned dialog box! When I try to validate the upgrade, I get 100s of errors during the process- one of them is that the upgrade exited w/ an exception (and no further description.) I think the old install kit (which used Installshield 9, the new one uses 12) had quite a few problems.

One thing I don't understand is that further along in the process, there's a custom action setting REINSTALLMODE to vomus, I think from the standard omus. But this happens well after the automatic dialog box, so it shouldn't be having an effect.

If you have any ideas for how I can uninstall the old version before reinstalling, I'd be game to try. Otherwise, I may have to somehow call "msiexec /x:{GUID} /qn" via a batch file or something and then call my setup.exe.

Thanks much, AL

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 17 January 2008 - 19:50

The message "Another verison of this product is already installed. Installation of this version cannot continue." will ONLY be displayed if the ProductCode of the old and the new version are the same. Did you change the ProductCode? That's required for a Major Upgrade.

LrngToFly

LrngToFly
  • Full Members
  • 15 posts

Posted 17 January 2008 - 20:54

Steve, thanks again for your help. Indeed, I AM changing the Product Code (and Upgrade Code)- I've changed it multiple times- and same effect, I get that dialog box.

Interesting you mention that though. The uninstall string that I find in the registry under LOCAL_MACHINE\Software\Windows\CurrentVersion\Uninstall\{my GUID}, has NEVER changed- no matter if I change the product code, upgrade code, package code etc. Very strange. My .ism file is in XML mode, and when I search the file for the GUID from the uninstall string, it's not in there- neither is it in my old Installshield 9.0 .ism file either.

If you have any ideas for where that code is coming from- and more importantly- how to change it, I'd appreciate it! Thanks again, AL

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 17 January 2008 - 21:45

Open your built .msi file with InstallShield in Direct Edito mode, or with Orca. Check the ProductCode that your setup *really* has. If it's different from what you specified in the project:
- maybe you set a ProductCode in the Release settings (you can specify release-specific ProductCodes)
- are you including any merge modules? I have seen cases where a merge module had a ProductCde in the Property table (which is not allowed)

LrngToFly

LrngToFly
  • Full Members
  • 15 posts

Posted 17 January 2008 - 21:49

Will do. I have about 20 of my own merge modules. Thanks for the ideas- I'll report back!

LrngToFly

LrngToFly
  • Full Members
  • 15 posts

Posted 17 January 2008 - 22:01

Bingo- that seems to be it. That GUID is in the Property table of one of my Merge Modules. I have no idea how that would have gotten in there.

Very weird. I've also been having trouble with other merge modules where some Windows registry keys are making it into the Registry table- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Winsock2 and
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ !!

The first one kills the network on uninstall and the 2nd one makes the PC blue screen on reboot after an uninstall. I've added those to Filter.xml.

Installshield is certainly a royal pain. I suppose it's keeping me employed though!

Thanks a TON! AL

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 18 January 2008 - 18:41

QUOTE
Bingo- that seems to be it. That GUID is in the Property table of one of my Merge Modules. I have no idea how that would have gotten in there.

I think that was a bug that happened when migrating a merge module project from an older InstallShield version to a newer version.

QUOTE
Very weird. I've also been having trouble with other merge modules where some Windows registry keys are making it into the Registry table-

Maybe you are running into this InstallShield bug