Summary
CopyFile does not return the correct error value when attempting to overwrite an existing locked file. This will provide the wrong value in a condition statement and prevent the custom action from closing resulting in a hanging installation.Symptoms
When attempting to overwrite a locked file with the CopyFile function, no error code is returned which results in the installation hanging. In some cases, it will immediately go straight to the SetupCompleteError dialogCause
This behavior is caused by an issue with InstallShield 2013 and InstallShield 2014.Steps To Reproduce
- Create a new Basic MSI project
- Use the function example below as an InstallScript custom action (this is pulled from the CopyFile help example)
- In the Custom Actions view, add the ExFn_CopyFile to run after CostFinalize in the UI sequence
- Set the Return Processing property to Synchronous (Check exit code)
- Build the project using the default releases values
- Copy the newly created executable to both "C:\Target" and "C:\Source" or new values if you modified the sample listed above
- Launch the executable file copied to "C:\Target" and leave the process running
- Launch the executable from the original build location
- Message box with ?An unspecified error occurred? displays as the results are not returned properly and the installation is unable to proceed
#define SOURCE_DIR "C:\\Source"
#define TARGET_DIR "C:\\Target"
// Include Ifx.h for built-in InstallScript function prototypes.
#include "Ifx.h"
export prototype ExFn_CopyFile(HWND);
function ExFn_CopyFile(hMSI)
NUMBER nResult;
begin
// Copy all files in the source directory, including files
// in subdirectories, to the target directory.
nResult = CopyFile(SOURCE_DIR ^ "*.*", TARGET_DIR ^ "*.*");
// Report the results of the copy operation.
switch (nResult)
case 0:
MessageBox ("Files successfully copied.", INFORMATION);
case COPY_ERR_CREATEDIR:
MessageBox ("A target directory could not be created.", SEVERE);
case COPY_ERR_MEMORY:
MessageBox ("Insufficient memory.", SEVERE);
case COPY_ERR_NODISKSPACE:
MessageBox ("Insufficint disk space.", SEVERE);
case COPY_ERR_OPENINPUT:
MessageBox ("Unable to open the input files in "+ SOURCE_DIR +".",
SEVERE);
case COPY_ERR_OPENOUTPUT:
MessageBox ("Unable to copy the source files.", SEVERE);
case COPY_ERR_TARGETREADONLY:
MessageBox ("A target file already exists and cannot be overwritten.",
SEVERE);
default:
MessageBox ("An unspecified error occurred.", SEVERE);
endswitch;
end;
Resolution
This issue has been submitted as a bug to our Engineering team. The issue is being tracked under issue #IOJ-1667248.To apply the HotFix attached below, please do the following steps:
- Close IS 2014 SP 1.
- Rename the following files by prepending ORIG_ to the file name:
C:\Program Files (x86)\InstallShield\2014\Redist\Language Independent\i386\ISSetup.dll
C:\Program Files (x86)\InstallShield\2014\Redist\Language Independent\i386\ISP\ISSetup.dll
C:\Program Files (x86)\InstallShield\2014\Redist\Language Independent\i386\ISP\ISSetup.dll
3. Copy the HotFixed versions of ISSetup.dll to their respective locations on the target machine.
4. Launch IS 2014 SP 1 and rebuild the project.
Related KB Articles
InstallShield 2014 Known IssuesWas this helpful?
Related Articles
CopyFile function does not return when attempting to overwrite a locked target file 3Number of Views Locked File represented by rra File 3Number of Views InstallShield 11.5 Hotfix for Issues with Update 2, .NET Installer Class Support, CopyFile/XCopyFile, Activating InstallSh… 4Number of Views HOTFIX: Distribute to VM with Invalid Path Results in InstallShield Becoming Unresponsive 3Number of Views InstallShield 2014 Known Issues 4Number of Views
Revenera Assistant
Online
Hi, I am Reva - Ask me anything.
Updates
No new updates
Chat
Home
Updates
/**/
Thanks for the feedback!
Your feedback has been saved.Rate this response:
1
2
3
4
5
Add Additional feedback ( Optional )
0/240
English
English
Language changed successfully
Something went wrong
Email sent successfully
Something went wrong
Case create successfully
Are you sure you want to cancel
the case creation?
Please select a product to submit the case.
Please select a product version to submit the case.
0/255
Upload Attachment
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Are you sure you want to cancel the case creation?
Case closed successfully
File Upload
Maximum file size allowed is 3 MB.
File type not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
© 2026 Flexera Software. All Rights Reserved.
Case id: 00001065
Activity: Status change: 2 hours ago