Responding to Missing Source File Errors in InstallShield

If the build process cannot find a source file because it has been renamed or deleted, the build process returns error –6103 (“Could not find file file”) and –1007 (“Cannot copy source file to target directory”).

Two features of InstallShield can help you work with source files—path variables and dynamic file linking. Path variables are variables used by the InstallShield build process to represent the locations of source files on the development system. Whenever you add a file to a component, InstallShield by default creates a path variable or reuses an existing path variable to represent that file’s location. Instead of having to reestablish the file link if you move the source file, you can simply assign the path variable a new value in the Path Variables view of the InstallShield environment. The InstallShield help library also describes registry-based and environment variable-based path variables with which you can modify path variable values without having to modify the project file.

In addition, if you have source directories that contain lists of files continually changing, you can use dynamic file linking. With dynamic linking, you specify a directory and optional file name masks for inclusion and exclusion. Each build process then copies all of the matching files in the dynamic link into the corresponding component.

An important consideration regarding file linking is that a dynamically linked file cannot be the key file of its component. However, a component can contain any combination of static and dynamic links. A solution is to set a statically linked file as the key file, additionally marking the key file as an exclusion to the dynamic link.

When using dynamic file linking, it is important to specify a “previous package” in the build settings to ensure File, Component, and Media table keys are synchronized between builds.

For more information, see the InstallShield help topic ― Upgrade Considerations. How have you solved missing source file errors?

 

InstallShield® is the world's leading Windows installation development solution. InstallShield is designed to enable development teams to be more agile, collaborative and flexible when building reliable InstallScript and Windows Installer MSI installations for desktop, server, Web, virtual and traditional applications. The software installer of choice for today's sophisticated application producers, InstallShield is the only software installer that can directly convert MSIs to Microsoft App-V virtual packages. Get your free trial of InstallShield today or contact us for more information. 

InstallAnywhere is the leading multiplatform development solution for application producers who need to deliver a professional and consistent cross installation experience for physical, virtual and cloud environments. From a single project file and build environment, InstallAnywhere creates reliable installations for on-premises platforms – Windows, Linux, Apple OS X, Solaris, AIX , HP-UX, and IBM iSeries – and enables you to take existing and new software products to a virtual and cloud infrastructure and build Docker containers.  Get your free trial of InstallAnywhere or contact us for more information. 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *