View Single Post
Old 31st May 2017, 18:50   #132
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,420
1053 is ERROR_SERVICE_REQUEST_TIMEOUT "The service did not respond to the start or control request in a timely fashion"

There is no NSIS 3.02 yet, perhaps you just mean SVN trunk?

Works just fine for me
PHP Code:
RequestExecutionLevel admin
Section
!macro TestSvcStuff SVCNAME
SimpleSC
::ServiceIsRunning '${SVCNAME}'
Pop $returns an errorcode (<>0otherwise success (0)
Pop $returns 1 (service is running) - returns 0 (service is not running)
DetailPrint "ServiceIsRunning $$0=$0 $$1=$1 ${SVCNAME}"
SimpleSC::GetServiceFailureFlag '${SVCNAME}'
Pop $returns an errorcode (<>0otherwise success (0)
Pop $returns the service flag
DetailPrint 
"GetServiceFailureFlag 0: $0 1: $1"
SimpleSC::GetServiceFailure '${SVCNAME}'
Pop $returns an errorcode (<>0otherwise success (0)
Pop $returns the reset period 
Pop 
$returns the reboot message
Pop 
$returns the command
Pop 
$returns the first action (See "action_type_x" in the parameters)
Pop $returns the first action delay 
Pop 
$returns the second action (See "action_type_x" in the parameters)
Pop $returns the second action delay 
Pop 
$returns the third action (See "action_type_x" in the parameters)
Pop $returns the third action delay 
DetailPrint 
"GetServiceFailure 0: $0 1: $1 2: $2 3: $3 4: $4 5: $5 6: $6 7: $7 8: $8 9: $9"
!macroend
!insertmacro TestSvcStuff "Fax" Not running
!insertmacro TestSvcStuff "Power" Running
SectionEnd 
Are you actually trying to get the WIN32_EXIT_CODE and SERVICE_EXIT_CODE values?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote