Start tomcat service with inno setup using exec -


i've started using inno setup , have come across problem need stop , start tomcat using cmd. however, using solution using not working reason.

what trying accomplish to.

  1. stop tomcat using "net stop tomcat6"
  2. write string xml-file in tomcat folder.
  3. start tomcat using "net start tomcat6"

the solution trying is:

if exec(expandconstant('{cmd}'), '/c net stop tomcat6', '', sw_show, ewwaituntilterminated, resultcode)     begin       log('result code is: ' + inttostr(resultcode));       savestringtofile(dirpage.values[0] + '\conf\catalina\localhost\' + inputpage.values[0] + '.xml', generatexmlstring(inputpage.values[0], inputpage.values[1], inputpage.values[2],                                                                                           inputpage.values[3], inputpage.values[4], inputpage.values[5],                                                                                           inputpage.values[6]), false);       exec(expandconstant('{cmd}'), '/c net start tomcat6', '', sw_show, ewwaituntilterminated, resultcode);     end 

this doesn't seem right way go problem since doesn't stop nor start tomcat service.

these commands works if write them manually in cmd-window.

sincerely,


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -