0

I have an .exe in GO, which runs as Windows Service with "Local System" Account privilege, but when i reboot the system, it does not start up. If i change the "LogOnAs" feature of the service to any Administrator account the service startups on reboot as well. Is there any way to find out why this is happening.

The error that the service gives for not starting is "Error 1053: "The service did not respond in a timely fashion" when attempting to start, stop or pause a service"

I have even tried look at "proc monitor" in sysinternals, it does not give an failure or significant result.

0

The cause of Error 1053 can be as a result of Error starting a Windows Service or probably corrupt system files

Signs of Error starting a Windows Service

When you stop or pause a managed Microsoft Windows service, and the process of stopping or pausing the service takes more time than the default configured time, you receive the following error message:

Could not stop the Windows service name service on Local Computer.
Error 1053: The service did not respond to the start or control request in a timely fashion.

Note: Windows service name is a placeholder for the name of the Windows service that you have created.

Cause

The ServiceBase class calls the OnStop method directly from the Service command handler that is defined in the ScDispatcherLoop of the Advapi32.dll file. After 30 seconds, if the ScDispatcherLoop thread is not ready to receive a new service command from the service control manager, Windows Service Controller marks the service as time out. Therefore, you receive this error message.

Solution

To resolve this problem, obtain the latest service pack for the Microsoft .NET Framework 1.1.

Follow the steps to complete the installation. Once the updated service pack is installed you should no longer see the Error 1053 message appear when you try to start, stop or pause a Windows service.

Run a System File Checker scan to fix any corrupt system files

You may run a System File Checker (SFC) scan to fix any corrupt system files.

To do this, follow the steps mentioned below:

  • Click Start, All programs and then Accessories. Click Command Prompt (Ensure you run as administrator).

System File Checker gives an administrator the ability to scan all protected files to verify their versions. If System File Checker discovers that a protected file has been overwritten, it retrieves the correct version of the file from the cache folder (%Systemroot%\System32\Dllcache) or the Windows installation source files, and then replaces the incorrect file. System File Checker also checks and repopulates the cache folder. You must be logged on as an administrator or as a member of the Administrators group to run System File Checker. If the cache folder becomes damaged or unusable, you can use the sfc /scannow, the sfc /scanonce, or the sfc /scanboot commands to repair its contents.

System File Checker Tool Syntax

Sfc [/Scannow] [/Scanonce] [/Scanboot] [/Revert] [/Purgecache] [/Cachesize=x]


/Scannow: Scans all protected system files immediately and replaces incorrect versions with correct Microsoft versions. This command may require access to the Windows installation source files.

/Scanonce: Scans all protected system files one time when you restart your computer. This command may require access to the Windows installation source files when you restart the computer. The **SfcScan DWORD** value is set to 2 in the following registry key when you run this command:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

/Scanboot: Scans all protected system files every time you start your computer. This command may require access to the Windows installation source files every time you start your computer. The SfcScan DWORD value is set to 1 in the following registry key when you run this command:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

/Revert: Returns scan to the default setting (do not scan protected files when you start the computer). The default cache size is not reset when you run this command. This command is equivalent to the /Enable switch in Windows 2000.

/Purgecache: Purges the file cache and scans all protected system files immediately. This command may require access to the Windows installation source files.

/Cachesize=x: Sets the file cache size to xmegabytes (MB). The default size of the cache is 50 MB. This command requires you to restart the computer, and then run the /purgecache command to adjust the size of the on-disk cache. This command sets the SfcQuota DWORD value to x in the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

After the scan has completed, close the command prompt window, restart the computer and check for the issue.

Resources: Error 1053, Fix, SFC

| improve this answer | |
  • This has been copied from an msdn page, please post a link rather than copy pasting content. However this did not work – Pharaoh Aug 26 '17 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.