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
- :
- Re: Delete old files on an upgrade
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 26, 2010
10:28 AM
Delete old files on an upgrade
Hello,
I have an msi basic project working fine, but when hay create a new msi package, changing just upgrade code I thought that the upgrade will delete old files of my previous installation simply deleting them from "Files and Folder" view ,but not.
How can I tell InstallShield that an upgrade of my application must delete the old files installed by previous installation??
Thankyou
I have an msi basic project working fine, but when hay create a new msi package, changing just upgrade code I thought that the upgrade will delete old files of my previous installation simply deleting them from "Files and Folder" view ,but not.
How can I tell InstallShield that an upgrade of my application must delete the old files installed by previous installation??
Thankyou
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 26, 2010
12:11 PM
don't change the upgrade code. change the product code. The upgrade code is what tells Windows Installer Engine that it is the same program.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 27, 2010
11:52 AM
Thank you for your answer.
I'm already thought about that but the problem is that if i change the product code the installation ask me where I want to install again when I already have my application installed, I want to upgrade the installation deleting obsolete files.
I have created a installscript with this code:
#include "Ifx.h"
export prototype deleteSQLExternos();
function deleteSQLExternos()
// To Do: Declare local variables.
begin
MessageBox ('MSG TEST', INFORMATION);
if (DeleteDir(INSTALLDIR + '\\Fcs\\Externos\\sql',ALLCONTENTS) = 0) then
// Report success.
return TRUE;
//MessageBox ('[INSTALLDIR]\Fcs\Externos\sql' + " was deleted.", INFORMATION);
else
return FALSE;
//MessageBox ("Unable to delete directory.", SEVERE);
endif;
;
// To Do: Write script that will be executed when MyFunction is called.
end;
script compile right and I create a custom sequence to execute it. But installation fails, and log doesnt say anything, what Have I doing wrong????
I'm already thought about that but the problem is that if i change the product code the installation ask me where I want to install again when I already have my application installed, I want to upgrade the installation deleting obsolete files.
I have created a installscript with this code:
#include "Ifx.h"
export prototype deleteSQLExternos();
function deleteSQLExternos()
// To Do: Declare local variables.
begin
MessageBox ('MSG TEST', INFORMATION);
if (DeleteDir(INSTALLDIR + '\\Fcs\\Externos\\sql',ALLCONTENTS) = 0) then
// Report success.
return TRUE;
//MessageBox ('[INSTALLDIR]\Fcs\Externos\sql' + " was deleted.", INFORMATION);
else
return FALSE;
//MessageBox ("Unable to delete directory.", SEVERE);
endif;
;
// To Do: Write script that will be executed when MyFunction is called.
end;
script compile right and I create a custom sequence to execute it. But installation fails, and log doesnt say anything, what Have I doing wrong????
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 27, 2010
12:05 PM
A major upgrade will ask you where you are wanting to install to, It treats it as a reinstall.
Using properties and conditions you can check to see if this is an upgrade or fresh install and skip the dialog that lets them change the install directory and set the appropriate directory to install to based on previous install.
Look through the help files for Upgrades, and usng properties in conditions to see how to do this.
Using properties and conditions you can check to see if this is an upgrade or fresh install and skip the dialog that lets them change the install directory and set the appropriate directory to install to based on previous install.
Look through the help files for Upgrades, and usng properties in conditions to see how to do this.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 27, 2010
12:28 PM
In addition if I change the product code in add/remove programs add a new application with the same name:confused: :confused:
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 27, 2010
04:32 PM
you need to add an upgrade item in the upgrades view and you need to make sure the upgrade codes match between the versions or you will get multiple installs.