PATH

This command returns the full path used by the current user’s configuration that is associated with the indicated path number for 0 through 10. For path number 11 through 17 it returns special paths specific to the workstation. Valid path numbers are 0 through 17.

See Tables Used in GainSeeker for a list of which data files reside in each path.

Following is a list of path numbers and there associated paths:

  1. SPC Standards

  2. SPC Data

  3. DMS Standards

  4. DMS Data

  5. Archive data

  6. User Documents 1

  7. Traceability

  8. SPC Templates

  9. Import/Export

  10. User Documents 2

  11. Configuration data

  12. Application path

  13. Microsoft Excel

  14. Microsoft Word

  15. Registry look-up (see Path 14 below)

  16. settings.hsi

  17. Cms.ini

  18. Windows temp (see
    Path 17 below)

Syntax

PATH Path_Number

Return value

This command returns the path for the given number.

Examples

 

Path 14

Path 14 uses three MySvar variables to locate a registry key and return the value. This can be useful when searching the registry for the path of applications that are installed. These three variables are:

mysvar "registry_hkey" which contains a root key. Valid root key options are:

HKEY_LOCAL_MACHINE = &H80000002

HKEY_CLASSES_ROOT = &H80000000

HKEY_CURRENT_USER = &H80000001

HKEY_USERS = &H80000003

mysvar "registry_key" which contains a registry key

mysvar "registry_subkey" which will return the value for the given subkey

Example:

mysvar "registry_hkey" = "&H80000002" :

mysvar "registry_key" = "SOFTWARE\Microsoft\Windows\HTML Help" :

mysvar "registry_subkey" = "Gainseek.CHM" :

Svar1 = Path 14

Svar1 would contain the registry value stored at:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\HTML Help\Gainseek.CHM

Example:

mysvar "registry_hkey" = "&H80000002" :

mysvar "registry_key" = "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Excel.exe " :

mysvar "registry_subkey" = "path " :

mysvar "ExcelPath" = PATH 14 :

RUN (CONCAT MySvar "ExcelPath", "excel.exe ", CHR 34, MySvar "ReportPathFilename", CHR 34)

PATH 14 would contain the registry value stored at:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Excel.exe\path

Path 17

Path 17 returns the Cms.ini setting for temp_path= . If this is not set, it defaults to the Windows temp folder.