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
- :
- Would setting NEVER_OVERWRITE help?
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
‎Apr 10, 2012
08:53 AM
How do you stop an install if a folder already exists
My current program is broken down into 2 parts. One if a full install of the application and the other is an upgrade. This is mostly done to help reduce the size of the upgrade file. However I do get people from time to time downloading the full install and using that. This however has become a problem due to a clean .dbc file that is included in the install and not the patch. This ends up overwriting the file and causing my application not to work.
What I want to do is have IS 2012 determine that the folder exists, pop up an error message saying something along the lines of you already have installed the full version of this application, please download and run the upgrade and then exit out of the installation before any files are unpacked.
Any help would be greatly appreciated.
What I want to do is have IS 2012 determine that the folder exists, pop up an error message saying something along the lines of you already have installed the full version of this application, please download and run the upgrade and then exit out of the installation before any files are unpacked.
Any help would be greatly appreciated.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 10, 2012
03:39 PM
If your project is an InstallScript Msi project, allowing you to use *.rul InstallScript files, you can modify the following code snippet, taken from the InstallShield Help editor:
/*--------------------------------------------------------------*\
*
* InstallShield Example Script
*
* Demonstrates the ExistsDir function.
*
* AskPath is called to get a directory name from the user.
* Then, ExistsDir is called to determine whether the directory
* exists.
*
\*--------------------------------------------------------------*/
#define TITLE_TEXT "ExistsDir Example"
// Include Ifx.h for built-in InstallScript function prototypes.
#include "Ifx.h"
export prototype ExFn_ExistsDir(HWND);
function ExFn_ExistsDir(hMSI)
STRING svPath;
begin
// Get the path to be created.
AskPath ("Please enter a path:", "", svPath);
// Check for the existence of the directory.
if (ExistsDir (svPath) = EXISTS) then
SprintfBox (INFORMATION, TITLE_TEXT, "%s already exists.", svPath);
else
SprintfBox (INFORMATION, TITLE_TEXT, "%s does not exist", svPath);
endif;
end;
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 16, 2012
11:05 AM
If the concern is that overwriting a particular file causes problems only when the full setup is run, when the product already exists, would it be helpful to set the Component condition to NEVER_OVERWRITE that particular file, rather than adding another dialog to the setup?
