tksearch.exe

The tksearch utility performs a Toolkit search for the following information:

Two versions of the utility come with ServerGuide Scripting Toolkit:

tksearch usage

The tksearch utility syntax:
tksearch driverpath [/W:n | /WP:nospath | WP:prodspec.ini] [/M:machtype/platform_ID] [/B:filename] [/?]

The tksearch utility uses these parameters.

Table 1. tksearch parameters
Parameter Description
driverpath The fully qualified directory path to start searching for driver sets. For example: F:\sgdeploy\drvs.
/W:n The preferred version of Windows to device drivers to search for:
  • 0 = Windows Server 2000
  • 1 =Windows Server 2003 (Default)
  • 2 = Windows 2000 Professional
  • 3 = Windows XP
  • 4 = Windows Server 2003 x64
/WP:nospath The fully qualified path to directory to start searching for the Windows prodspec.ini file. For example, F:\sgdeploy\os\w23_std
/WP:prodspec.ini The fully qualified path to the Windows prodspec.ini file. For example, F:\sgdeploy\os\w23_std\i386\prodspec.ini
/I:machinetype/platform_ID
  • Limits the search to the specified machine types or platform IDs.
  • To specify multiple machine types or platform IDs use a comma as the delimiter, for example, /I:8853,8854.
/B:filename
  • The name of the batch file in which to place the resulted environment variables.
  • The default is .\DrvSet.bat. Environment variables are:
    • TK_NOS_Type - (Win2000, Win2003)
    • TK_NOS_Arch - (I386, AMD64)
    • TK_NOS_Arch_Type - (x86, x64)
    • TK_NOS_DDL_Type - (Win2000 Server, Win2003 Server, Win2003 Server x64)
    • TK_NOS_DDL_Path_# - (number of drivers sets found)
    • TK_NOS_DDL_Path_1 - (corresponding drivers set)
    • TK_NOS_DDL_Path_2 - (corresponding drivers set) TK_NOS_DDL_Path_3 (corresponding drivers set)

Return codes

The tksearch utility returns the following values to indicate status:
  • 0 - Success: One or more driver libraries were found.
  • 1 - Success: No driver libraries were found.
  • 2 - Error: Command-line syntax error.
  • 3 - Error: Writing output batch file.
  • 4 - Error: Driver path not found.
  • 5 - Error: NOS not found in specified path.
  • 6 - Error: General application error.

tksearch examples

The following examples illustrate tksearch utility usage.

Table 2. tksearch examples
Example Description
tksearch f:\sgdeploy\drvs Search all ServerGuide drivers sets regardless of machine type or NOS type.
tksearch f:\sgdeploy\drvs /W:4 Search all ServerGuide drivers sets for Windows Server 2003 x64 regardless of machine type.
tksearch f:\sgdeploy\drvs /WP:f:\w2000\i386\prodspec.ini Search all ServerGuide drivers sets for Windows Server 2000 regardless of machine type.
tksearch f:\sgdeploy\drvs /M:8853,7978 Search all ServerGuide drivers sets for systems with machine type 8853 and 7978 regardless the NOS type.
tksearch f:\sgdeploy\drvs /M:8853 /W:f:\sgdeploy\os\w23_std Search all ServerGuide drivers sets for systems with machine type 8853 and Windows 2003 Standard.
tksearch f:\sgdeploy\drvs /M:8853,7978 /B: Search all ServerGuide drivers sets for systems with machine type 8853 and 7978 regardless the NOS type. The search results are saved as environment variables in Batch file drvset.bat.
tksearch f:\sgdeploy\drvs /M:8853 /WP:F:\sgdeploy\os\w23_ee /B:drivers.bat Search all ServerGuide drivers sets for systems with machine type 8853 and Windows 2003 The search results are saved as environment variables in the batch file drivers.bat.