|
|
#1 |
|
Junior Member
Join Date: Jul 2007
Posts: 17
|
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. |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jul 2007
Posts: 17
|
Actually I should have search a little more on google before posting this question. The solution was easy. I am using this solution(for anyone who falls into the same trap!!)
pop $1 ;$1 contains the name of the service. ExecDos::exec /NOUNLOAD /ASYNC /DETAILED '"$vCOMSPEC" /C "net stop $1 /Y"' "" "$TEMP\output.log" Prabhat. |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|