View Single Post
Old 19th July 2007, 11:27   #1
123mobile
Junior Member
 
Join Date: Jul 2007
Posts: 17
Question Problem in stopping a service.

Hi,

I am trying to stop few services for the installation of my software, One particular service is "IIS Admin Service" which depends on other service.
If I do it on command propmt writing:
net stop IISADMIN, It says:

>The following services are dependent on the IIS Admin >Service service.
>Stopping the IIS Admin Service service will also stop >these services.
>
> World Wide Web Publishing Service
> HTTP SSL
>
>Do you want to continue this operation? (Y/N) [N]:

And here I need to press Y to stop.

My problem is that while using NSIS I want to automate this process without using the command prompt. ie I want to stop this service and any other service which depend on it without asking me.

I tried following two things but did not work...

a) services::SendServiceCommand 'stop' 'IISADMIN'

b) ExecDos::exec /NOUNLOAD /SYNC '"net stop /
IISADMIN"' "Y" "$EXEDIR\execdos.log"

I would be very thankful for anybody who can let me know for a solution of this.
123mobile is offline   Reply With Quote