OverviewExamples
Service.Create ( |
string DisplayName = "Service1", number ServiceType = SERVICE_WIN32_OWN_PROCESS, boolean AllowDesktopInteraction = false, number StartType = SERVICE_DEMAND_START, number ErrorControl = SERVICE_ERROR_NORMAL, table Dependencies = nil, |
-- Create a Service1.exe service
Service.Create("C:\\WINDOWS\\Service1.exe", "Service1", "Service1", SERVICE_WIN32_OWN_PROCESS, true, SERVICE_DEMAND_START, SERVICE_ERROR_NORMAL, "", "", nil, "", "");
-- Get the last error (0 == success)
err = Application.GetLastError();
if err ~= 0 then
-- If there was an error, output to user
Dialog.Message(err, _tblErrorMessages[err]);
end
Creates a service named Service1 using Service1.exe from C:\WINDOWS.
See also: Related Actions