I want to restart Windows service using command prompt in [Icons] section using Inno Setup. Please help me to solve the problem.
I want to restart Windows service using command prompt in [Icons] section using Inno
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use
sc start [service]to start a service andsc stop [service]to stop it. With some servicesnet start [service]is doing the same.But if you want to use it in the same batch, be aware that
sc stopwon’t wait for the service to be stopped. In this case you have to usenet stop [service]followed bynet start [service]. This will be executed synchronously.