Archive: nsSCM::Install fails on XP, works on 2008


nsSCM::Install fails on 2003, works on 2008
Using the latest build of nsSCM posted in the wiki, it seems there is a bug regarding the Install function. I'm doing all of my testing in VMware OS's, so I can revert back to a 'clean slate' each time I do a test.

On 2003 x86, nsSCM::Install fails. On 2008 x64, nsSCM::Install is successful. It's the exact same code/installer too. Any idea on a fix?


DetailPrint "Installing ${MYSERVICE_DISPLAYNAME} service..."
nsSCM::Install /NOUNLOAD "${MYSERVICE_SERVICENAME}" "${MYSERVICE_DISPLAYNAME}" 16 2 "$\"$INSTDIR\bin\abcpollerd.exe$\" -c $\"$INSTDIR\etc\abcpollerd.conf$\"" "" "" "$U_USER" "$U_PASS"
Pop $0
DetailPrint "Service install exited with: $0"
${If} $0 != "error"
; set the failure / restart actions
WriteRegBin HKLM "SYSTEM\CurrentControlSet\Services\${MYSERVICE_SERVICENAME}" "FailureActions" 00000000000000000000000003000000530065000100000060EA00000100000060EA00000100000060EA0000
WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\${MYSERVICE_SERVICENAME}" "Description" "${MYSERVICE_DESCR}"
nsSCM::Start "${MYSERVICE_SERVICENAME}"
${EndIF}

Throughout my installer, I've got "!ifndef COMPILE" around all of the FILE commnds. This way I can quickly test a code change with out having to compress all of the nested installers.

I've noticed that when I do have COMPILE defined, nsSCM::Install doesn't work on 2003. Yet, when I do not have COMPILE define (thus, just installer code made), nsSCM::Install works on 2003. Additionally, the above block of code is near the last section of the giant installer (approx line 860). Is it possible there is some sort of stack / calling issue with nsSCM?

Is


Well forget it. I've migrated over to the SimpleSC plugin instead which works flawlessly on both Windows 2003 and 2008.