Launch a cmd file as a windows service - Advanced Installer Community
netali.golan
Posts: 9
Joined: Wed Jul 06, 2016 1:59 pm

Launch a cmd file as a windows service

Hi

i'm trying to figure out how to install a new windows service that run .cmd file with start and stop arguments.
can anyone help me?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Launch a cmd file as a windows service

Hello and welcome to our forums,

I'm afraid I don't fully understand your requirement. Can you please give us more details about your scenario (maybe exemplify a bit)?

Do you want to install a service whose source file is a BAT file? If so, then please note this is not possible.

If you want only to call a BAT file within your service application on start or stop methods, then you should do so within your service application code. Then to install the service you can use our "Services" page.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
netali.golan
Posts: 9
Joined: Wed Jul 06, 2016 1:59 pm

Re: Launch a cmd file as a windows service

i want to install solr as part of my software installation as a windows sevice .
solr has a cmd file in order to run it .
but if you said that i can't create a service that run a cmd file i can't do what i need .
thanks for the help
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Launch a cmd file as a windows service

Hello,

If you want to install solr as a service by launching a BAT file during installation then you can simply add your solr file and the related BAT file in "Files and Folders" page and then launch the BAT file using a "Launch file" custom action.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”