The information in this article applies to:
SUMMARY
A dependency (.DEP) file contains information about the run-time
requirements of an application or component; it contains information
regarding which files are needed, how the files are to be registered, and
where they should be installed on the target computer. You can create
dependency files for standard Visual Basic projects, ActiveX controls,
ActiveX documents, and other ActiveX components. MORE INFORMATION
A dependency file is a standard Windows .INI file and can be read and
written to using the standard Windows APIs (GetPrivateProfileString and
WritePrivateProfileString).
Dest=The Dest= key indicates the destination folder for the component. This value may be a relative path, a full path, or a path based on any of the following macros (for example, it may be simply a macro, or it may be a macro followed by a backslash and a relative path):
The Dest= key applies only to the component to which the section applies.
By default, all files dependent on the component will also be placed in the
same location. To override the location for a "child," you can create a
section for the "child" and specify a different destination in that
section.
UsesN=The UsesN= key (where N is an integer) indicates a dependent file for the component. A file specified by a UsesN= key is required for the component defined by that section. In a section, N must be sequential and must start with 1. For an illustration, refer to the following sample section:
In this example, MyOCX.OCX depends upon (or requires) MyDLL.DLL and
MyOCX.TXT.NOTE: If the UsesN keys are not ordered sequentially, or if a number is skipped, dependent files may not be recognized in the section and may not be acknowledged by the Setup Wizard or PDW. Register=The Register= key indicates whether the file should be registered and, if so, how it should be registered. The valid values for this key are:
If the Register= key is omitted altogether, the file is not registered.
Version=(Optional)The Version= key indicates the version of the component that is needed. The Setup Wizard and PDW can detect that a .dep file is out-of-date using the Version= key. The version is specified in the format a.b.c.d, as in the following example:
Date=(Optional)The Date= key is the date stamp of the component that is needed. The Setup Wizard and PDW can detect that a .DEP file is out-of-date using this key. This value must always be in the format d/m/yyyy or dd/mm/yyyy, even when using a localized Setup Wizard or PDW. For example:
-or-
NOTE: This key is ignored if a value is specified for the Version= key.
Time=(Optional)The Time= key is the time stamp of the component that is needed. The Setup Wizard and PDW can detect that a .DEP file is out-of-date using this key. This value must always be in the 24-hour format hh:mm:ss, even when using a localized Setup Wizard or PDW. For example: NOTE: This key is ignored if a value is specified for the Version= key.
ProgramIconTitle= and ProgramIconCmdLine=(Optional)The ProgramIconTitle= key indicates that a shortcut (or Program Manager icon for Windows NT 3.51) should be created if the file is installed. The value for the ProgramIconTitle= key is the title given to the shortcut (or icon). The value may be quoted or unquoted. For example:
If you indicate that a shortcut should be created, you can give the command
line for the shortcut by specifying a value for the ProgramIconCmdLine=
key. The path that you use for the command-line value may contain the
macros listed for the Dest= key. For example:
Localized ComponentsSome components may have different dependencies based on the language. To install a component based on the language setting for the client's computer, you may specify a section with the component name followed by the language ID.For example, VBRUN500.DLL has a satellite DLL for all languages (with the exception of English):
In this example, if VBRUN500.DLL is installed and the client's language
settings are French, VB5FR.DLL will also be installed. Likewise, if
VBRUN500.DLL is installed and the client's language settings are German,
VB5DE.DLL will be installed.
Sample Dependency FileThe following is a sample .DEP file for a component named MyOCX.OCX. This dependency file would be named MyOCX.DEP:
MyOCX.OCX is a self-registering file that is installed in the
Windows\System folder (or Winnt\System32 folder on NT). MyOCX.OCX depends
upon (requires) three files: MyDLL.DLL, MyServer.EXE, and VBRUN500.DLL.MyServer.EXE is a self-registering file that is installed in the Windows folder (or Winnt folder on NT). MyServer.EXE has only one dependent file, VBRUN500.DLL. If MyServer.EXE is installed during setup, a shortcut is created with the title "My Program" and the command line Windows\System\MyOCX.OCX (or Winnt\System32\MyOCX.OCX on NT). MyDLL.DLL is also a self-registering file. A destination for MyDLL.DLL is not specified; thus, it will be placed in the destination path for its parent, MyOCX.OCX. VBRUN500.DLL will not be registered because a Register= key is not specified in its section. VBRUN500.DLL will be placed in the Windows\System (or Winnt\System32) folder. If VBRUN500.DLL is installed during setup, VB5DE.DLL will be installed if the language setting is German and VB5FR.DLL will be installed if the language setting is French. If the language setting is set to something other than French or German, no additional files will be installed. How Setup Wizard and PDW Search for Dependency InformationWhen the Setup Wizard and PDW need to find dependency information for a file (for example, MyOCX.OCX), they follow a specific path. The wizards use the following methods to locate a section entitled [MyOCX.OCX]; when the section is found, the search ends.
REFERENCESFor additional information about how the Setup Wizard and PDW combine dependency files with the Visual Basic project and the VB5DEP.INI or VB6DEP.INI file to create a setup program, a Setup.LST, and a project .DEP file, refer to the Distributing Your Application" section of the Visual Basic "Programmer's Guide." Additional query words: directory
Keywords : kbwizard kbAppSetup kbVBp kbVBp500 kbVBp600 kbGrpVB kbPDWizard |
Last Reviewed: January 5, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |