9.5.2 ServiceGetValue (get values in the service information)
- Purpose
-
Gets values stored in a service information object.
- Syntax
ServiceGetValue(ServiceInfoName, Keyword1::ValueBuff1, Keyword2::ValueBuff2, ...)
- Arguments
-
- ServiceInfoName
-
Specify the name of the service information object as a character string or as a variable that stores this value.
- Keyword1 to Keyword11
-
Specify each keyword.
- ValueBuff1 to ValueBuff11
-
Specify a variable for storing the value of each keyword.
The keywords you can specify in Keyword1 to Keyword11, and the values set in ValueBuff1 to ValueBuff11 are as follows:
Keyword
Value and meaning
Name
Service name
DispName
Display name
Type
Service type
SERVICE_WIN32_OWN_PROCESS
The service runs as an independent Win32 process.
SERVICE_WIN32_SHARE_PROCESS
The service shares a Win32 process with another service.
SERVICE_KERNEL_DRIVER
The service is a Windows NT device driver.
SERVICE_FILE_SYSTEM_DRIVER
The service is a Windows NT file system driver.
Start
Time at which the service starts
SERVICE_BOOT_START
The operating system loader starts the device driver.
SERVICE_SYSTEM_START
The IoInitSystem function starts the device driver.
SERVICE_AUTO_START
The service control manager automatically starts the device driver or Win32 service at system startup.
SERVICE_DEMAND_START
The service control manager starts the device driver or Win32 service when the StartService function is invoked from the process.
SERVICE_DISABLED
The device driver or Win32 service can no longer be started.
Errctl
Error severity if the service fails to start at system startup
SERVICE_ERROR_IGNORE
The boot program logs the error and continues startup processing.
SERVICE_ERROR_NORMAL
The boot program logs the error, displays a pop-up message, and continues startup processing.
SERVICE_ERROR_SEVERE
The boot program logs the error.
SERVICE_ERROR_CRITICAL
The boot program logs the error if it is possible.
Path
Full path of the service program
Group
Load ordering group to which the service belongs
DependG
Dependency on a group
DependM
Dependency on a service
StartName
Service account name
Password
Account password
- Description
-
The ServiceGetValue command acquires the stored service information for the required keywords only. The execution result is stored in the _SVC_RTN_ reserved variable. The command returns True on successful execution, or False for all other states.
- Example
' Get information about the JP1/Script service. Dim svDispName, svType, svStart, svErrctl, svPath ' Set JP1/Script "JSService" service information. ServiceSetValue("JSService", Name::"JP1_Script") ' Get the settings for "JSService" service information. ServiceQuery("JSService") ' Get the settings stored in "JSService" service information, ' and store them in variables. ServiceGetValue("JSService", DispName::svDispName _ , Type::svType _ , Start::svStart _ , Errctl::svErrctl _ , Path::svPath)
- JP1/Script version
-
Supported from JP1/Script 01-00.