Archive: nsSCM


nsSCM
I'm trying to install a windows service using nsSCM and having some trouble. Anyone know where the error codes are explained? I'm getting "1057" from an install. Here's the code:

Name "ServiceInstallTest"
OutFile "Test.exe"
!include "./defines.nsh"



Section "Service Install Section" ServInst
nsSCM::QueryStatus myService
pop $0
pop $1
MessageBox MB_OK "Service Existance = $0 Status = $1" IDOK 0
;strCmp $0 'error' 0 stopAndStart

Dialogs::InputBox "UserID" "Please enter service username to run new service as" "OK" "Cancel" "0" ${VAR_R1}
Dialogs::InputBox "Password" "Please enter the service user password:" "OK" "Cancel" "1" ${VAR_R2}

nsSCM::Install "myService" "This is a test service" 16 2 "C:\WINNT\system32\services.exe" "" "" $R1 $R2

pop $0
pop $1

MessageBox MB_OK "myService - userID is: $R1 and password is: $R2" IDOK 0
MessageBox MB_OK "Error/success is $0 and last error return is: $1" IDOK 0


SectionEnd


MSDN, Error codes, 1057 The account name is invalid or does not exist. ERROR_INVALID_SERVICE_ACCOUNT


I tried taking out the serviceUser and Password and was getting various other "already exists" errors, which it doesn't. Any clue?