Summary
Discussion on causes and resolutions for build time error -1007Symptoms
When building an InstallShield project, the following error may occur:
Error -1007: Cannot copy source [1] to target [2]
This error may also appear as follows:
Error -1007: Cannot copy source [1] to target [2]. The file path is longer than the limit set by the OS.
[1] and [2] are placeholders that contain the paths being referenced during the build process.
Cause
This build error is known to occur in the following scenarios:
- If the error specifies "The file path is longer than the limit set by the OS", the build location is too deep in the Windows folder structure.
- The file being copied does not exist in the location where the product is searching.
- There is insufficient disk space on the target drive; therefore, the file cannot be copied.
- The target location has security or other permissions that prevent writing to this location.
- A file is linked to a path variable in a project, but the path variable is later renamed.
Resolution
The following has been known to resolve this behavior in all reported cases:
- If the error specifies "The file path is longer than the limit set by the OS", this error occurs because the build path is written to the registry, and different Windows Operating Systems have different limits on how long a registry entry can be. The release path is long and has exceeded the limit. (For additional information on these limits, see the References section.) Change the build location by selecting Build > Release Wizard. Select a short build path, such as "C:\MyBuilds", and build the release again.
- Make sure all files exist in their expected locations by following these steps:
- Open the Files and Folders view.
- Note the files included in the project listed in the lower right panel.
- If any files display the message "***File_Not_Found***" in the Link To column, re-add them to the project as their locations have changed.
- Make sure that sufficient disk space exists on the drive where the InstallShield build is targeted. For example, if the built project is expected to be 200 MB in size, make sure at least 500 MB in free space exists on this drive. Also, empty all temporary folders. The specific temporary folders for a machine can be determined by accessing the DOS prompt and typing "set". Note the values listed for "TEMP" and "TMP", and delete all files in those locations.
- To ensure that there are no permissions or security issues that would cause this location to be inaccessible or unwritable, attempt to copy a file to the build location in the Windows Explorer outside of InstallShield. If the file cannot be copied or the location cannot be accessed, contact your systems administrator to get permission to access this location.
- If using path variables to link to files within a project, make sure the names of these variables have not changed since they were used. Make sure that all files point to valid path variables in the Files and Folders view. If any point to old path variable names, delete and re-add them to the project with the updated path variable name.
Additional Information
This error is briefly documented in the InstallShield Help Library topic Build Errors and Warnings.
For additional information on registry size limits, see the Microsoft MSDN article Registry Element Size Limits.
Additional information on path variables can be found in the InstallShield Help Library topic Path Variables View.
Related Articles
Build Error 1007 3Number of Views Build Error -4075 6Number of Views Build Error -1014 15Number of Views Build Error -5008 11Number of Views InstallShield Build Error 1501 8Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
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. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago