Archive: nsSCM::Install -> Start -> Stop -> Remove and all over again without restart?


nsSCM::Install -> Start -> Stop -> Remove and all over again without restart?
Playing with the nsSCM dll plugin

I have created an installer which install a system driver/service using:
nsSCM::Install /NOUNLOAD "XXX" "XXX desc" \
1 /* SERVICE_KERNEL_DRIVER */ \
3 /* SERVICE_DEMAND_START */ \
"$SYSDIR\drivers\xxx.sys" \
"" "" "" ""
nsSCM::Start /NOUNLOAD "XXX"

and upon uninstall:

nsSCM::Stop /NOUNLOAD "XXX"
nsSCM::Remove /NOUNLOAD "XXX"

Some painfull trail and error thought me that a computer restart is required between uninstall and reinstall.

trying to install the driver without the restart will fail with error 1078: "The name is already in use as either a service name or a service display name"

though it make some sense... and though it was very popular in win95... I want to do better.

can I do it without the restart?


nsSCM::Remove "XXX" ?
maybe the /NOUNLOAD is wrong placed at tis point.

you should use /NOUNLOAD only if the data created by the plugin instruction is need by later plugin instructions


Originally posted by Comm@nder21
maybe the /NOUNLOAD is wrong placed at tis point.
well since my driver is not working yet... I have tried removing all the /NOUNLOAD so now we have:

nsSCM::Install \
"XXX" "XXX desc" \
1 /* SERVICE_KERNEL_DRIVER */ \
3 /* SERVICE_DEMAND_START */ \
"$SYSDIR\drivers\xxx.sys" \
"" "" "" ""
nsSCM::Start "XXX"

and upon uninstall:
nsSCM::Stop "XXX"
nsSCM::Remove "XXX"

did not help! it will still succeed on first intall and uninstall and fail on all subsequent tries.

p.s. I had it wrong the first time the error number is:[
$0 = error, $1 = 1072.

It's possible there is a missing call in the plug-in itself. Try comparing its code to some code off the web.