Skip to content
⌘ NSIS Forum Archive

Service Start Type automatic delayed start

8 posts

r2du-soft#

Service Start Type automatic delayed start

hi
i use for change Service Start Type from code:

SimpleSC::SetServiceStartType "wuauserv" "2" ;automatic
SimpleSC::SetServiceStartType "wuauserv" "3" ;manual
SimpleSC::SetServiceStartType "wuauserv" "4" ;disabled
i how can change to automatic delayed start?
thanks
th_mi#
Check out this:
r2du-soft#
Originally Posted by th_mi View Post
Thanks i read this.
I knew can change a value in registry for change Start Type to automatic delayed start.
but i I do not want change value in registry and i want do this work with NSIS command.
This is a bug in!!!! if nsis haven't a parameter for change Start Type to automatic delayed start?


Originally Posted by jpderuiter View Post
How about SimpleSC::SetServiceDelayedAutoStartInfo?
when i use from:
SimpleSC::SetServiceDelayedAutoStartInfo "wuauserv" "5"
Pop $0
MessageBox MB_OK "$0"
i see in MessageBox number 0 !!!!!
my service is start and Start type in automatic (delayed start)!!!!!
jpderuiter#
Why do you use 5 as a parameter?
Only 0 and 1 are supported...
delayed_autostart - The delayed auto-start setting of an auto-start service
- 0 - The service will be started during system boot.
- 1 - The service will be started after other auto-start services are started plus a short delay
BTW: please don't use exclamation marks, as it's very annoying, certainly when it turns out you didn't read the manual good enough...
r2du-soft#
Originally Posted by jpderuiter View Post
Why do you use 5 as a parameter?
Only 0 and 1 are supported...BTW: please don't use exclamation marks, as it's very annoying, certainly when it turns out you didn't read the manual good enough...
Thanks mr jpderuiter
i before test all parameters 0 till 5 later.
when copy command to that post i not change 5 to 1.
i test again parameters 0 and 1 but not work
jpderuiter#
So, what is not working?
Rereading your post it says that it's working:
Originally Posted by r2du-soft View Post
my service is start and Start type in automatic (delayed start)
Did you reboot your PC?
MSDN says you should
Originally Posted by MSDN;http://msdn.microsoft.com/en-us/library/windows/desktop/ms685155(v=vs.85).aspx
The change takes effect the next time the system is started.
r2du-soft#
Originally Posted by jpderuiter View Post
So, what is not working?
Rereading your post it says that it's working😁id you reboot your PC?
MSDN says you should
oooooo
im so sorry

this work and set Startup Type service to AUTOMATIC:

SimpleSC::SetServiceStartType "wuauserv" "2" ;automatic
i set manual startup type to disable and use from you're code:

SimpleSC::SetServiceDelayedAutoStartInfo "wuauserv" "1"
but not change to AUTOMATIC (Delay Start).

after i use them together:

SimpleSC::SetServiceStartType "wuauserv" "2" ;Set Automatic
SimpleSC::SetServiceDelayedAutoStartInfo "wuauserv" "1" ;Set Automatic To Delay Start
and worked very good. (after change to automatic can change that to automatic delay start).

It was a mistake on my behalf 😕

Thanks For Help Mr jpderuiter
My Problem Solved