I am unable to install a service I created with WinDev. I'm trying to install the service from the project init code of another app. I am on an admin account and I'm running the app in test mode. I receive a system error code of '5' and a system error of 'Access is denied'.
IF NOT ServiceExist("AbcUpdate") THEN
sServicePath is string = "C:\PathIsCorrect\AbcUpdate.exe"
Service.Description = "Update service for Abc products."
Service.Startup = serviceStartupAutomatic
Service.DelayedStartup = True
Service.StartupError = serviceErrorSerious
Service.CommandLine = sServicePath
Service.User = AccountLocalSystem
Service.Type = serviceTypeSimple
IF ServiceInstall("AbcUpdate") THEN
IF NOT ServiceStart("AbcUpdate") THEN
// Log Error
Error("ServiceInstall('AbcUpdate'). '" + ErrorInfo(errFullDetails) + "'")
END
ELSE
// Log Error
Error("ServiceInstall('AbcUpdate'). '" + ErrorInfo(errFullDetails) + "'")
END
END