JSI Tip 1261. At Least One Service or Driver Failed.... and no System Event entry?

To determine what service or driver didn't sart, without an event log entry, is a painful trial and error process.

Using NETSVC and SC, I have scripted SVCNStart.bat to test the Start value of all non-running services and drivers, and to report those who's ErrorControl is not 0 (ignore). To use SVCNStart.bat:

SVCNStart \\ComputerName

The console output contains:

\\ComputerName "Service or Driver Name" "Type of Object" "Start Parameter"

SVCNStart.bat contains:

@echo off
if "%1"

"" goto syntax set machine=%1 set machine=%machine:"=% if "%machine:~0,2%"

"\\" goto begin :syntax @echo SVCNStart \\ComputerName endlocal goto end :begin for /f "Skip=1 Tokens=1-3 Delims=" %%i in ('netsvc %1 /list') do call :test "%%j" endlocal goto end :test if %1

"" goto end set svc=%1 for /f "Tokens=1-4" %%i in ('netsvc "%machine%" %svc% /query') do call :test1 "%%k" goto end :test1 if %1

"running" goto end if %1

"1060" goto end if %1

"not" goto end for /f "Skip=3 Tokens=1-2* Delims=: " %%i in ('sc "%machine%" qc %svc%') do call :test2 "%%i" "%%j" "%%k" goto end :test2 if /i %1

"TYPE" set OK=N&set type=%3 if /i %1

"ERROR_CONTROL" goto test3 if /i not %1

"START_TYPE" goto end set strt=%3 if %2 LSS "0" goto end if %2 GTR "2" goto end set OK=Y goto end :test3 if "%OK%"

"N" goto end if %2 EQU "0" goto end @echo %machine% %svc% %type% %strt% :end

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.