Quantcast
Channel: WinDev Forum
Viewing all articles
Browse latest Browse all 1914

[WD20] Error Installing Service (Access is denied) (no replies)

$
0
0
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

Viewing all articles
Browse latest Browse all 1914

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>