Assuming that in windows(windows 7 or Higher versions) operating system, we have created service or by default some application created a service.
Now we want to stop that service using Innosetup, The given below code to stop the service.
[Run]
Filename: {sys}\sc.exe; Parameters: "stop service_name" ; Flags: runhidden
Filename: {sys}\sc.exe; Parameters: "stop service_name" ; Flags: runhidden
This code should be place in RUN section of innosetup.
Example: Considered That you have installed Mysql and its working Good. Now you want to stop Mysql service by using innosetup. Considering service_name as mysql, The given below code to stop mysql
[Run]
Filename: {sys}\sc.exe; Parameters: "stop mysql" ; Flags: runhidden.
Filename: {sys}\sc.exe; Parameters: "stop mysql" ; Flags: runhidden.
No comments:
Post a Comment