NsSCM plug-in: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
m (Wikipedia python library) |
m (Updated author and download links, and changed format of some pages.) |
||
Line 1: | Line 1: | ||
== Links == | == Links == | ||
<attach>NsSCM.zip</attach> | |||
== The Script == | == The Script == | ||
Line 67: | Line 67: | ||
</highlight-nsis> | </highlight-nsis> | ||
Page author: sl | Page author: [[User:sl|sl]] |
Revision as of 12:40, 23 April 2005
Links
NsSCM.zip (8 KB)
The Script
; Turn off old selected section ; Methods: ; 1 str 2 str 3 num 4 num 5 str 6 str 7 str ; [name of service: startstop name] [name to display: display in SCM] [service type] [start type] [service's binary:filepath] [load order group: name] [dependencies: name] nsSCM::Install /NOUNLOAD [parameters] Pop $0 ; return error/success ; [name of service:startstop name] nsSCM::Start /NOUNLOAD [parameters] Pop $0 ; return error/success ; [name of service:startstop name] nsSCM::QueryStatus /NOUNLOAD [parameters] Pop $0 ; return error/success Pop $1 ; return service status ;!define SERVICE_STOPPED 0x00000001 ;!define SERVICE_START_PENDING 0x00000002 ;!define SERVICE_STOP_PENDING 0x00000003 ;!define SERVICE_RUNNING 0x00000004 ;!define SERVICE_CONTINUE_PENDING 0x00000005 ;!define SERVICE_PAUSE_PENDING 0x00000006 ;!define SERVICE_PAUSED 0x00000007 ; [name of service:startstop name] nsSCM::Stop /NOUNLOAD [parameters] Pop $0 ; return error/success ; [name of service:startstop name] nsSCM::Remove /NOUNLOAD [parameters] Pop $0 ; return error/success ; Samples: ; Driver (boot stage starting) nsSCM::Install /NOUNLOAD "XXX" "XXX driver" 1 0 "$SYSDIR\drivers\XXX.sys" "" "" Pop $0 ; return error/success ; Driver (sscm stage starting) nsSCM::Install /NOUNLOAD "XXX" "XXX driver" 1 1 "$SYSDIR\drivers\XXX.sys" "" "" Pop $0 ; return error/success ; Driver (manual starting) nsSCM::Install /NOUNLOAD "XXX" "XXX driver" 1 3 "$SYSDIR\drivers\XXX.sys" "" "" Pop $0 ; return error/success ; Service (auto starting) nsSCM::Install /NOUNLOAD "XXX" "XXX service" 16 2 "$PROGRAMFILES\${PRJ_NAME}\XXX.exe" "" "" Pop $0 ; return error/success ; Service (manual starting) nsSCM::Install /NOUNLOAD "XXX" "XXX service" 16 3 "$PROGRAMFILES\${PRJ_NAME}\XXX.exe" "" "" Pop $0 ; return error/success nsSCM::Start /NOUNLOAD "XXX" Pop $0 ; return error/success nsSCM::QueryStatus /NOUNLOAD Pop $0 ; return error/success Pop $1 ; return service status IntCmp $1 4 lbl_Return ; check on running
Page author: sl