Jun 06, 2017
10:40 AM
We are making a slight change to the name of our product, which means I need to modify the installer so that it installs to a new folder and the registry key name should also change. I have tried many things and I keep getting 1316 (Specified account exists) errors, old folders that aren't removed, two installations...you name it. InstallShield 2015, BTW Take the following scenario: Version 1.0.0.0 Already installed in C:\Program Files (x86)\Company\Product Registry entries are created in HKLM\SOFTWARE\WOW6432Node\Company\Product I need to create an upgrade so that when it does the upgrade, it changes the following: Version 1.0.0.1 When upgrading, change the install directory to C:\Program Files (x86)\Company\Product2. The old directory should no longer exist on the system. Registry entries should be changed to HKLM\SOFTWARE\WOW6432Node\Company\Product2. Like the directory, the old registry key should no longer exist on the system. One of the tricky things is that during the initial setup of 1.0.0.0, the user can select some items to install and those options are stored in the registry. When I run the upgrade, I don't want to rerun that prompt and instead simply upgrade any selections they made during the initial installation. So let's say during the initial installation, they selected item A, B, C for installation, but not D, E, F. The registry would have: Version 1.0.0.0: HKLM\...\Product\Items\A HKLM\...\Product\Items\B HKLM\...\Product\Items\C During the upgrade, I don't want to prompt them again. I just want to upgrade A, B, and C as needed. So I can't just blow away the registry for this application. Instead, I want to rename it so that it looks like: Version 1.0.0.1: HKLM\...\Product2\Items\A HKLM\...\Product2\Items\B HKLM\...\Product2\Items\C So I wondering which of the following options are best and how to do them: [LIST=1] Do a complete uninstall of 1.0.0.0 and then install 1.0.0.1. I tried creating a major upgrade and selecting the 'Completely uninstall old setup...' option, but this didn't seem to have any effect. This would be my preferred method, if I could figure out how to preserve the registry items selected from the initial installation. Update 1.0.0.0 to 1.0.0.1 and, at the same time, rename the install directory and registry to the new paths. My fear of doing this is that there are probably a ton of references to these paths all over the system (under-the-hood stuff). This seems more like a hack, and not the proper way to do this. Not to mention, I have tried this and am not having any luck. 😮 I should also point out that the lead developer is really adamant about not changing the other parts of the version number. Unless I can demonstrate that that would be the only way to get this working, he won't budge. Any help would be greatly appreciated. Regards, Scott
... View more
Labels
- Labels:
-
InstallShield 2015
Apr 12, 2017
09:26 AM
This one's kind of hard to explain, so please bear with me. I have a 2015 InstallScript MSI Project (MyProject) that has an executable (AppA.exe) that is compiled in Visual Studio to a folder called 'bin'. AppA.exe has a service that needs to be installed with it (AppA_Service). Now, if MyProject is installed on a 32-bit machine, AppA_Service has a dependency on a specific process (one that I can't edit or control) and if it's installed on a 64-bit machine, it has a dependency on a different process (which I also have no control over). AppA.exe is one of several executables in MyProject, however, AppA is the only one having this issue - and it's the only one set up this way...go figure). In InstallShield, I created two components for it: AppA_x86 and AppA_64. They both contain the same file. That is, the Link To field is the bin folder. I set their conditions so that it will only install for that respective platform. It's worth noting that these two components have different Component Codes and Keys: Component: AppA_x86, Condition: NOT VersionNT64, Component Code: {ABC-123}, Key: AppA.exe Component: AppA_x64, Condition: VersionNT64, Component Code: {DEF-456}, Key: AppA.exe1 I then add both of these to the same Feature. This seems to work fine for a first time installation. However, the problem comes when upgrading. Every other executable updates just fine. AppA.exe, however, does not. No errors or anything, it just doesn't upgrade. Things I have tried that did not work: [LIST=1] Giving both components the same Component Code. I figured since only one gets installed... Adding a Major Upgrade item with the current Upgrade Code and all earlier versions. I looked thru the InstallScript stuff, but not seeing anything that can help. Custom Actions I also got it down to one component, then wrote a script to update the registry when installing said component. It still did not recognize that it needs to upgrade that one executable. I thought that a component was upgraded if the internal file's keys matched that of the key already installed. So if that's the case, shouldn't AppA.exe be updated? All of the other files update, just not this one. Is there something I can look for to determine how it decided not to update the file? Is there a way to force it to upgrade that executable no matter what? Does anyone have any suggestions as to how I can make it so that I can get that executable to upgrade? If this is a stupid way of doing it, and there's a way to conditionally set a component services dependencies, please let me know. Thanks in advance, Scott
... View more
Labels
- Labels:
-
InstallShield 2015
Mar 24, 2017
02:13 PM
Take a deep breathe, you are very close LOL! You sound like you know me. 🙂 I think that the version number is what I was missing. As soon as I tested with versions where one of the first three changed, it started doing an upgrade instead of installing both versions. However, there was still the issue of the upgrade message not popping up in these cases ('This setup will perform an upgrade of 'Application'. Do you want to continue?'). Do you know if there is a way to enable this message again? Again, it works when upgrading to alike product codes, but if the product code is different, and one of the first three version numbers changed, it does not display this message but does do the upgrade. Any ideas on how to get that message back? Thanks again, Scott
... View more
Mar 08, 2017
12:29 PM
Chad, Thanks for your help on this! 1.0.0.0 ProductCode: {ABC-123} UpgradeCode: {DEF-456} 1.0.0.1 ProductCode: {ABC-123} UpgradeCode: {GHI-789} (Changed) 1.0.0.2 ProductCode: {JKL-012} (Changed) UpgradeCode: {GHI-789} 1.0.0.3 ProductCode: {JKL-012} UpgradeCode: {MNO-345} (Changed) I took your advice and added a Major Upgrade item to the installer for each old UpgradeCode. So I added one for {DEF-456}, one for {GHI-789} and one for the current one. I also specified to apply to 'Any earlier version'. It still doesn't upgrade properly. Here were my results: 1.0.0.0 -> 1.0.0.1: Recognized and ran upgrade. Upgraded existing to proper version. 1.0.0.0 -> 1.0.0.2: Did not recognize upgrade. Both versions ended up getting installed. 1.0.0.1 -> 1.0.0.2: Did not recognize upgrade. Both versions ended up getting installed. 1.0.0.0 -> 1.0.0.3: Did not recognize upgrade. Both versions ended up getting installed. 1.0.0.1 -> 1.0.0.3: Did not recognize upgrade. Both versions ended up getting installed. 1.0.0.2 -> 1.0.0.3: Recognized and ran upgrade. Upgraded existing to proper version. It's like that ProgramCode is a point at which it just won't recognize it as the same program, regardless of the UpgradeCode. I also looked at the link you specified and played around with the other nodes in the version number. In those cases I also got mixed results, however I was never able to get earlier versions with different product codes to be recognized as upgrades (in some cases it would not prompt for the upgrade, but the end result was that it showed the correct version in Programs & Features - so I presume it uninstalled and reinstalled). If you have any other suggestions, please let me know. Otherwise, do you know of any quality resources where I can read more in-depth about upgrades, versions, etc? I have visited a lot of sites but nothing I've found provide good details with examples. Thanks again, Scott
... View more
Mar 07, 2017
04:01 PM
Background: VS 2015 C# WinForm application InstallShield 2015 Professional InstalScript MSI project We have an installer where the setup files have gotten their ProductCode and UpgradeCodes out of sync from previous versions. The chronology of the builds goes something like this: 1.0.0.0 ProductCode: {ABC-123} UpgradeCode: (DEF-456) 1.0.0.1 ProductCode: {ABC-123} UpgradeCode: {GHI-789} (Changed) 1.0.0.2 ProductCode: (JKL-012) (Changed) UpgradeCode: {GHI-789} So from version .0 to .1, the UpgradeCode was modified. From version .1 to .2, the ProductCode was modified. I am now ready to deploy version 1.0.0.3. It has the same ProductCode and UpgradeCode as 1.0.0.2: 1.0.0.3 ProductCode: (JKL-012) UpgradeCode: {GHI-789} At this point, all earlier versions are installed out there somewhere. So I have some users on v1.0.0.0, some on v1.0.0.1, etc. The question is, is there any way to configure InstallShield so that I can get all of them back on the same ProductCode and Upgrade code so that going forward, I can run proper updates? By a proper update, I mean that when the setup exe runs, it notifies the user that this is an update and then only updates files as needed. As it is now, if a user on a version prior to the ProductCode change (<1.0.0.2), and runs 1.0.0.3, it does not recognize this as an upgrade and installs the new version along side the old one. However, if they have 1.0.0.2 (on the new ProductCode) and run 1.0.0.3, it works fine. This is all expected, as I understand that the installer recognized different ProductCodes as different products, but what I need is a way to get everything back in sync with the latest setup file. Lastly, our setup file includes options to select specific features and a custom option selector. If it does a fresh install, or anything other than a proper upgrade, these panels show up in the installer with the original default settings. We want to avoid having these pop up during an upgrade, which is why it is so important to get the setup file back in sync so that upgrades are upgrades and fresh installs are fresh installs all around. Oh, and we want to avoid having the user uninstall/reinstall the product because the user may not know aforementioned setup options the second time around. Thanks in advance, Scott
... View more
Labels
- Labels:
-
InstallShield 2015
Dec 07, 2016
10:47 AM
Background: VS 2015 C# WinForm application Has multiple exe's in it that are packaged with the application Has multiple custom drivers that are also packaged with the application Testing by installing in a clean VM running Windows 7 Ultimate x64. InstallShield 2015 Professional InstalScript MSI project One of the dialogs in our setup prompts the user with a list of all our drivers and allows them to select which to install. When reinstalling (using the same compiled setup file) this dialog automatically selects all the currently installed drivers and allows the user to install more or uninstall existing. This is currently working. The problem comes when I try to upgrade. When I compile a new version of the setup file and run it on a VM that has an earlier version of the app installed, I need it to give the user a chance to again change/update their driver selection. I am able to get the message to appear as needed using the OnResumeUIBefore event, but when it actually runs the upgrade, nothing gets installed or removed the same as when they just reinstall. I am guessing that there's obviously some disconnect between the dialog I display and telling the upgrade engine to actually do it, but I cannot figure out how to do that. Again, I must point out that this same code appears in the OnFirstUIBefore and OnMaintUIBefore events and works fine in both of those. If anyone can help, I would greatly appreciate it. Thanks in advance! Here is my OnResumeUIBefore code: function OnResumeUIBefore() int nResult, nPrompt; string szTitle, szMsg; begin Dlg_SdWelcome: szTitle = SdLoadString(ISWI_RESUMEUI_TITLE); szMsg = SdLoadString(ISWI_RESUMEUI_MSG); nResult = SdWelcome(szTitle, szMsg); nPrompt = MessageBox("This installer has detected a previous version of TheApplication. In addition to upgrading, " + "do you wish to add to or modify the drivers that are currently installed?", MB_YESNOCANCEL); if (nPrompt = CANCEL) then abort; else if (nPrompt = 7) then // NO = 7. goto Dlg_SdStartCopy; endif; Dlg_SdDriverOptionList: szTitle = "Select the drivers you want to install."; szMsg = "Select the drivers you want to install, and deselect the drivers you do not want to install."; // _Drivers is a feature in InstallShield that contains sub-features - one for each driver. nResult = SdAskOptionsList(szTitle, szMsg, "_Drivers", NONEXCLUSIVE); if (nResult = BACK) then goto Dlg_SdWelcome; endif; Dlg_SdStartCopy: // Added in IS 2009 - Set appropriate StatusEx static text. szMsg = SdLoadString( IDS_IFX_STATUSEX_STATICTEXT_UPDATEUI ); SdSubstituteProductInfo( szMsg ); SetStatusExStaticText( szMsg ); Enable(STATUSEX); endif; end;
... View more
Labels
- Labels:
-
InstallShield 2015
Latest posts by SMM-OSSI
Subject | Views | Posted |
---|---|---|
2362 | Jun 06, 2017 10:40 AM | |
1404 | Apr 12, 2017 09:26 AM | |
1721 | Mar 24, 2017 02:13 PM | |
1721 | Mar 08, 2017 12:29 PM | |
2787 | Mar 07, 2017 04:01 PM | |
1249 | Dec 07, 2016 10:47 AM |
Activity Feed
- Posted Changing Product Name for Upgrade on InstallShield Forum. Jun 06, 2017 10:40 AM
- Tagged Changing Product Name for Upgrade on InstallShield Forum. Jun 06, 2017 10:40 AM
- Tagged Changing Product Name for Upgrade on InstallShield Forum. Jun 06, 2017 10:40 AM
- Tagged Changing Product Name for Upgrade on InstallShield Forum. Jun 06, 2017 10:40 AM
- Posted File not updating during upgrade on InstallShield Forum. Apr 12, 2017 09:26 AM
- Posted Re: ProductCode and UpgradeCode out of sync on InstallShield Forum. Mar 24, 2017 02:13 PM
- Posted Re: ProductCode and UpgradeCode out of sync on InstallShield Forum. Mar 08, 2017 12:29 PM
- Posted ProductCode and UpgradeCode out of sync on InstallShield Forum. Mar 07, 2017 04:01 PM
- Posted Prompting User During Upgrade and Changing Options on InstallShield Forum. Dec 07, 2016 10:47 AM
- Tagged Prompting User During Upgrade and Changing Options on InstallShield Forum. Dec 07, 2016 10:47 AM
- Tagged Prompting User During Upgrade and Changing Options on InstallShield Forum. Dec 07, 2016 10:47 AM
- Tagged Prompting User During Upgrade and Changing Options on InstallShield Forum. Dec 07, 2016 10:47 AM
- Tagged Prompting User During Upgrade and Changing Options on InstallShield Forum. Dec 07, 2016 10:47 AM