Specifies the application associated with the script. Only one application can be associated with a script. On the source computer it is called from the Detection function. On the destination computer, it can be called from anywhere to resolve the application path. The interpreter resolves the APPLICATIONPATH keyword, which is not valid and should not be used before this call is issued. The script should call Detect in the Detection function to avoid unnecessary processing.
The parameters for Detect are the executable name and an optional registry key value. Both parameters are string values. The registry value path parameter is the full path to the registry value that holds the path to the executable. If the registry value is the default parameter, the path should end with the key name and a slash (see example following). In the Detection function the script must check the return value of Detect to determine whether to continue processing the script or to terminate the script.
The Executable name (string value)
The registry path (string value)
Detect ( <Executable name>, [Registry path] );
if( Detect( "MyApp.exe", "HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\MyApp.exe\\" ) == false)
{
return;
}
if (Detect ( <executable Name>) == false)
return;
|
Copyright © 2013 CA.
All rights reserved.
|
|