- Windows service failing to start
- Answered by:
- Question
- Answers
- All replies
- Failed to install and start Windows services in WiX installer
- 5 Answers 5
- Start or stop Windows service from command line (CMD)
- Troubleshoot Start menu errors
- Basic troubleshooting
- Check the OS and update version
- Check if Start is installed
- Check if Start is running
- Check whether the system a clean install or upgrade
- Check if Start is registered or activated
- Other things to consider
- Failing to start Windows service after a MajorUpgrade with WiX
- 2 Answers 2
Windows service failing to start
This forum is closed. Thank you for your contributions.
Answered by:
Question
I am trying to test the deplyment of Windows Vista RC1 using Windows Deployment Services (WDS). I have Installed WDS using WAIK on Windows Server 2003 Sp1. Installation completed Successfully, however i am not able to start the service of WDS. Following errors are logged in event logs:
Event ID: 257 Source: WDSServer
Description: An error occurred while trying to start the Windows Deployment Services server. Error Information: 0x54B
Event ID: 513 Source: WDSServer
Description: An error occurred while trying to initialize provider BINLSVC from C:\WINDOWS\system32\binlsvc.dll. Windows Deployment Services server will be shutdown.Error Information: 0x54B
Any help would be greatly appreciated.
Thanks in advance.
Answers
Thank you for the reply!
What I did was the following:
I changed the WDS logon account to a Domain Admin account to start the service. It worked — it created the SCP in AD. I then changed it back to the Local system system.
Thank you for the assistance.
- Marked as answer by Tim Quan Moderator Monday, June 22, 2009 4:09 AM
All replies
Maybe a stupid question.
Did you install Remote Installation Service (RIS) on your server?
If not. Install RIS and then run the WDS update från the WAIK package. Then run WDS från administrative tools.
I have the same issue. I installed the WDS update on an R2 system that used to be our production RIS server.
C:\Public\Utils\Err>err 0x54b
# for hex 0x54b / decimal 1355
ERROR_NO_SUCH_DOMAIN winerror.h
# The specified domain either does not exist or could not be
# contacted.
Windows Deployment Services uses Active Directory as a database for storing configuration information. Additionally, WDS can link physical booting computers to logical computer objects stored in AD. The binlsvc.dll provider provides this integration and must contact AD in order to be functional.
The error you are receiving generally indicates that you have a networking configuration problem on your server that is causing the domain to be unreachable. I would start by checking your DNS settings — ensure that all NICs in your machine are pointing to local DNS servers (and not internet / external DNS servers), ensure that your domain suffix actually matches that of the domain, etc.
Failed to install and start Windows services in WiX installer
I am creating an MSI package for installing and starting Windows services using WiX v3.8. The code as follows:
But install fails with the following errors in the log:
How can I fix the errors?
5 Answers 5
The error message you are getting is the generic message the Windows Installer sends when it fails to start a service during install. Almost always the issue is that the Service is missing a dependency or otherwise not fully configured when the start occurs. To debug the root issue try:
- Install the MSI package.
- When the error dialog comes up indicating there is a failure to start the service *do not dismiss the dialog.
- Start services.msc or use sc.exe from the command-line to attempt to start your service. The Windows Installer should have configured enough of the service to be able to debug deeper why it failed.
- If necessary debug into your service executable directly to see why it cannot be started.
If this is a service written in managed code, ensure that it does not depend on files being placed in the GAC. Files are not in the GAC until very, very late during the installation process. If you must use files in the GAC, you will not be able to use the built-in ServiceControl element and will have to write a custom action to run after InstallFinalize . Note that after InstallFinalize a custom action will not be elevated so your service will have to support being started by non-elevated users. Again, I recommend not depending on the GAC.
Start or stop Windows service from command line (CMD)
We normally use Services.msc to start or stop or disable or enable any service. We can do the same from windows command line also using net and sc utilities. Below are commands for controlling the operation of a service.
Command to stop a service:
To start a service:
You need to have administrator privileges to run net start/stop commands. If you are just a normal user on the computer, you would get an error like below.
To disable a service:
To enable a service:
To make a service start automatically with system boot:
Note: Space is mandatory after ‘=’ in the above sc commands.
This SC command works on a Windows 7 machine and also on the down-level editions of Windows i.e Windows XP/2003 and Windows Vista. Again, if you do not have administrator previliges you would get the below error.
Note that the service name is not the display name of a service. Each service is given a unique identification name which can be used with net or sc commands. For example, Remote procedure call (RPC) is the display name of the service. But the service name we need to use in the above commands is RpcSs.
So to start Remote procedure call service the command is:
These service names are listed below for each service. The first column shows the display name of a service and the second column shows the service name that should be used in net start or net stop or sc config commands.
Troubleshoot Start menu errors
Start failures can be organized into these categories:
- Deployment/Install issues — Easiest to identify but difficult to recover. This failure is consistent and usually permanent. Reset, restore from backup, or rollback to recover.
- Performance issues — More common with older hardware, low-powered machines. Symptoms include: High CPU utilization, disk contention, memory resources. This makes Start very slow to respond. Behavior is intermittent depending on available resources.
- Crashes — Also easy to identify. Crashes in Shell Experience Host or related can be found in System or Application event logs. This can be a code defect or related to missing or altered permissions to files or registry keys by a program or incorrect security tightening configurations. Determining permissions issues can be time consuming but a SysInternals tool called Procmon will show Access Denied. The other option is to get a dump of the process when it crashes and depending on comfort level, review the dump in the debugger, or have support review the data.
- Hangs — in Shell Experience host or related. These are the hardest issues to identify as there are few events logged, but behavior is typically intermittent or recovers with a reboot. If a background application or service hangs, Start will not have resources to respond in time. Clean boot may help identify if the issue is related to additional software. Procmon is also useful in this scenario.
- Other issues — Customization, domain policies, deployment issues.
Basic troubleshooting
When troubleshooting basic Start issues (and for the most part, all other Windows apps), there are a few things to check if they are not working as expected. For issues where the Start menu or subcomponent isn’t working, you can do some quick tests to narrow down where the issue may reside.
Check the OS and update version
- Is the system running the latest Feature and Cumulative Monthly update?
- Did the issue start immediately after an update? Ways to check:
- PowerShell:[System.Environment]::OSVersion.Version
- WinVer from CMD.exe
Check if Start is installed
If Start fails immediately after a feature update, on thing to check is if the App package failed to install successfully.
If Start was working and just fails intermittently, it’s likely that Start is installed correctly, but the issue occurs downstream. The way to check for this problem is to look for output from these two PS commands:
get-AppXPackage -Name Microsoft.Windows.ShellExperienceHost
get-AppXPackage -Name Microsoft.Windows.Cortana
Failure messages will appear if they aren’t installed
If Start is not installed, then the fastest resolution is to revert to a known good configuration. This can be rolling back the update, resetting the PC to defaults (where there is a choice to save to delete user data), or restoring from backup. No method is supported to install Start Appx files. The results are often problematic and unreliable.
Check if Start is running
If either component is failing to start on boot, reviewing the event logs for errors or crashes during boot may pin point the problem. Booting with MSCONFIG and using a selective or diagnostic startup option will eliminate and/or identify possible interference from additional applications.
- get-process -name shellexperiencehost
- get-process -name searchui
If it is installed but not running, test booting into safe mode or use MSCONFIG to eliminate third-party or additional drivers and applications.
Check whether the system a clean install or upgrade
- Is this system an upgrade or clean install?
- Run test-path «$env:windir\panther\miglog.xml»
- If that file does not exist, the system is a clean install.
- Upgrade issues can be found by running test-path «$env:windir\panther\miglog.xml»
Check if Start is registered or activated
- Export the following Event log to CSV and do a keyword search in a text editor or spreadsheet:
- Microsoft-Windows-TWinUI/Operational for Microsoft.Windows.ShellExperienceHost or Microsoft.Windows.Cortana
- «Package was not found»
- «Invalid value for registry»
- «Element not found»
- «Package could not be registered»
- Microsoft-Windows-TWinUI/Operational for Microsoft.Windows.ShellExperienceHost or Microsoft.Windows.Cortana
If these events are found, Start is not activated correctly. Each event will have more detail in the description and should be investigated further. Event messages can vary.
Other things to consider
When did the problem start?
- Top issues for Start menu failure are triggered
- After an update
- After installation of an application
- After joining a domain or applying a domain policy
- Many of those issues are found to be
- Permission changes on Registry keys or folders
- Start or related component crashes or hangs
- Customization failure
To narrow down the problem further, it’s good to note:
What is the install background?
- Was this a deployment, install from media, other
- Using customizations?
- DISM
- Group Policy or MDM
- copyprofile
- Sysprep
- Other
- Group policy settings that restrict access or permissions to folders or registry keys can cause issues with Start performance.
- Some Group Policies intended for Windows 7 or older have been known to cause issues with Start
- Untested Start Menu customizations can cause unexpected behavior by typically not complete Start failures.
Failing to start Windows service after a MajorUpgrade with WiX
I have a pretty straight forward WiX project. Nothing fancy. When trying to perform a MajorUpgrade over an existing installation, it is unable to start the service and inevitably rolls back to the previous version and starts the service just fine. I have removed the Start=»install» and manually started the application successfully, so I know it’s not a dependency issue.
I have searched endlessly and found no answers to my problem.
My service install:
I dumped the MSI log to a file and got this error but it is quite vague.
There are some registry modifications during an installation. The installer attempts to read from the registry and inherit the already existing values.
2 Answers 2
Debugging Results: Following a lot of debugging (by original poster — OP) this turned out to be a known MSI issue described here: https://wix-users.narkive.com/EMfQPDrM/a-bug-get-reg-sz-when-using-type-integer. Nice search work.
What is in a DWORD? (a REG_SZ apparently): Essentially MSI «converts» a DWORD value found via a RegistrySearch operation to a formatted string — REG_SZ — during upgrade installations (could be more involved too). This causes services that expect a DWORD value to fall over on startup during major upgrades. A very exotic error.
Workaround: One can try to «solve» this problem by making the service code capable of reading both DWORD and REG_SZ . This yields a more robust solution than solving the problem in a custom action since it is a «permanent» fix as long as the code is in there (and the presence of the code alerts other developers about the problem). Or maybe use only REG_SZ ?
Quick Checks: Check the service password and login — obviously. Anything in the Event Viewer? Windows Key + Tap R + eventvwr.msc + Enter . How to use the Event Viewer to troubleshoot problems with a Windows Service. Perhaps you can try to do a folder diff on the before and after folders and see if you see something unexpected in the config files? Naturally there will be lots of binary differences, but check the text files (also encoding). Check the MSI log file again and search for «value 3» as described here: Tips For Checking MSI Log Files. Manually copy the new files in place and attempt to start the service via the services.msc applet .
Service Experts: Windows Services Frequently Asked Questions (FAQ). Content seems to be up to date — at face value at least. These guys claim to be experts on services. I have no idea who they are.
Look in the «Errors» section in the link above. Here are some extracts:
Generic Check Lists: If none of the above does anything, maybe try these «torpedoes full spread» check-lists (just ideas to start debugging):
General Purpose Debugging: Throwing in some general-purpose debugging approaches.
Some Further Links: