win32_add_service_env_var
win32_add_service_env_var
Add a custom environment variables on service
void **win32_add_service_env_var** string $servicename string $varname string $value
Add a custom environment variables on
service. This function work only for the local computer. Administrative privileges are required for this to succeed.
varname``servicename
servicenameThe service name to add environment variable.
varnameThe environment variable name.
valueThe environment variable value.
return.void
A is thrown if the
value of parameter is empty.
ValueError``service
A is thrown if the
value of parameter is empty.
ValueError``varname
A is thrown on error.
Win32ServiceException
win32_get_service_env_vars``win32_remove_service_env_var