Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Service Start Type automatic delayed start (http://forums.winamp.com/showthread.php?t=378616)

r2du-soft 11th July 2014 07:50

Service Start Type automatic delayed start
 
hi
i use for change Service Start Type from code:

HTML 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 11th July 2014 09:06

Check out this:
http://blogs.technet.com/b/askperf/a...tic-start.aspx

jpderuiter 11th July 2014 09:49

How about SimpleSC::SetServiceDelayedAutoStartInfo?

r2du-soft 11th July 2014 14:49

Quote:

Originally Posted by th_mi (Post 3001253)

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?


Quote:

Originally Posted by jpderuiter (Post 3001255)
How about SimpleSC::SetServiceDelayedAutoStartInfo?

when i use from:
HTML Code:

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 13th July 2014 22:53

Why do you use 5 as a parameter?
Only 0 and 1 are supported...
Quote:

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 14th July 2014 05:56

Quote:

Originally Posted by jpderuiter (Post 3001500)
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 14th July 2014 07:06

So, what is not working?
Rereading your post it says that it's working:
Quote:

Originally Posted by r2du-soft (Post 3001283)
my service is start and Start type in automatic (delayed start)

Did you reboot your PC?
MSDN says you should
Quote:

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 14th July 2014 07:50

Quote:

Originally Posted by jpderuiter (Post 3001529)
So, what is not working?
Rereading your post it says that it's working:Did you reboot your PC?
MSDN says you should

oooooo
im so sorry

this work and set Startup Type service to AUTOMATIC:

HTML Code:

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

HTML Code:

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

after i use them together:

HTML Code:

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 :confused:

Thanks For Help Mr jpderuiter
My Problem Solved


All times are GMT. The time now is 17:33.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.