This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Downgrade is not removing the files from installation i am downgrading from.
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 09, 2015
03:22 PM
Downgrade is not removing the files from installation i am downgrading from.
Hi All;
I am trying to get my installer project setup so that a user will be able to downgrade to an older version of our application if need be. I have removed the ispreventdowngrade object from my MSI projects and set the "Upgrade Windows Installer Setup" on the "Upgrades" page , to "Completely Uninstall old setup before installing new setup" and "Don't prompt the user, just install the upgrade". However when I run the downgrade the dlls that were installed as part of the installation I am downgrading from stay on the system.
Say I have v60 of our product installed and I want to downgrade to v59. I run the v59 installer and when it is completed I look in the product folders and see all our dlls with the v60 version. they should have been removed. when I look at the entry for our app in the control panel-->"uninstall a program" I see our product listed with the v59 version.
What could be causing the dlls to not be swapped out?
I am trying to get my installer project setup so that a user will be able to downgrade to an older version of our application if need be. I have removed the ispreventdowngrade object from my MSI projects and set the "Upgrade Windows Installer Setup" on the "Upgrades" page , to "Completely Uninstall old setup before installing new setup" and "Don't prompt the user, just install the upgrade". However when I run the downgrade the dlls that were installed as part of the installation I am downgrading from stay on the system.
Say I have v60 of our product installed and I want to downgrade to v59. I run the v59 installer and when it is completed I look in the product folders and see all our dlls with the v60 version. they should have been removed. when I look at the entry for our app in the control panel-->"uninstall a program" I see our product listed with the v59 version.
What could be causing the dlls to not be swapped out?
- Tags:
- downgrade
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 13, 2015
07:02 AM
Ideally you should not do the steps whatever you are following to provide downgrade support, Installshield itself does not provide the facility of downgrades.
1. If you really need to support downgrades , you can provide a VB script to customers along with your products setup.exe, it should do the actions like uninstall the installed product based on GUID and install latest product.
2. As You are saying Add/remove programs entries are updated but not dll files in installed location, when you used your hack/crack/technique/work_around , you can remove all files by writing custom action, in that if necessary u need to unregister the dlls before delete.you did not mention whether registry entries are downgraded are not
option1 is safe I feel.
regards,
Phanik
1. If you really need to support downgrades , you can provide a VB script to customers along with your products setup.exe, it should do the actions like uninstall the installed product based on GUID and install latest product.
2. As You are saying Add/remove programs entries are updated but not dll files in installed location, when you used your hack/crack/technique/work_around , you can remove all files by writing custom action, in that if necessary u need to unregister the dlls before delete.you did not mention whether registry entries are downgraded are not
option1 is safe I feel.
regards,
Phanik
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 13, 2015
07:15 AM
phanik wrote:
you did not mention whether registry entries are downgraded are not
Hi Phanik;
The DLLs are not registered, so that is not an issue. The registry entries that i put in through the installer are changed by the downgrade. I think i'm going to have to go with your option 1. I've tried the steps that Installshield Tech support have mentioned, adding a Major Upgrade Item, and it did not work.
Thanks
Shawn
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 13, 2015
01:21 PM
I suspect that if you mark your components as 'always overwrite' then a 'downgrade' may work. This is because it should ignore component rules of not overwriting a file with a higher version.
In the end if any of our clients wanted to 'downgrade' then the typical response is to uninstall the current version and install the version they desire.
In the end if any of our clients wanted to 'downgrade' then the typical response is to uninstall the current version and install the version they desire.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 20, 2015
05:52 AM
"always overwrite" option may or may not serve your purpose but in future if you make patch for your product , you will be in to another problem and patch upgrade does not work.
as you said u prefer option1: vb script , I am providing you piece of code. it may help you.
UNINSTALL
--------------------------------------------------------------------
Function UNINSTALL()
Const prod_GID = "your_product_GUID"
Const prod_GID1 = "your_product_GUID1"
Const prod_GID2 = "your_product_GUID2"
'if ur product was released several times with different GUIDs then u can add above statements.
strUninstallKey = "HKLM\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\UNINSTALL\"
strprod_GID = strUninstallKey & prod_GID & "\"
Set winInstaller = CreateObject("WindowsInstaller.Installer")
winInstaller.UILevel = 2
bprod_GID = False
If ( Len(GetRegKeyValue(strUninstallKey & prod_GID & "\UninstallString")) > 3) then
bprod_GID = True
End If
If ( (bprod_GID = TRUE) ) then
'wscript.echo "your product Already installed"
If ( bprod_GID = True ) then
winInstaller.UILevel = 2
iRC = winInstaller.ConfigureProduct(prod_GID, 0, 2)
If Err.number <> 0 then
' ur message
End If
If iRC <> 0 then
' ur message
End If
End If
End If
Set winInstaller = Nothing
'add ur code from here to install ur new product
End Function
Function GetRegKeyValue(ByVal sRegKey)
GetRegKeyValue = ""
On Error Resume Next
Err.Clear
GetRegKeyValue = objShell.RegRead(sRegKey)
On Error Goto 0
End Function
'------------------------------------
as you said u prefer option1: vb script , I am providing you piece of code. it may help you.
UNINSTALL
--------------------------------------------------------------------
Function UNINSTALL()
Const prod_GID = "your_product_GUID"
Const prod_GID1 = "your_product_GUID1"
Const prod_GID2 = "your_product_GUID2"
'if ur product was released several times with different GUIDs then u can add above statements.
strUninstallKey = "HKLM\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\UNINSTALL\"
strprod_GID = strUninstallKey & prod_GID & "\"
Set winInstaller = CreateObject("WindowsInstaller.Installer")
winInstaller.UILevel = 2
bprod_GID = False
If ( Len(GetRegKeyValue(strUninstallKey & prod_GID & "\UninstallString")) > 3) then
bprod_GID = True
End If
If ( (bprod_GID = TRUE) ) then
'wscript.echo "your product Already installed"
If ( bprod_GID = True ) then
winInstaller.UILevel = 2
iRC = winInstaller.ConfigureProduct(prod_GID, 0, 2)
If Err.number <> 0 then
' ur message
End If
If iRC <> 0 then
' ur message
End If
End If
End If
Set winInstaller = Nothing
'add ur code from here to install ur new product
End Function
Function GetRegKeyValue(ByVal sRegKey)
GetRegKeyValue = ""
On Error Resume Next
Err.Clear
GetRegKeyValue = objShell.RegRead(sRegKey)
On Error Goto 0
End Function
'------------------------------------
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)