Friday, October 19, 2012

Create Bat file to execute commands in AX


I wanted to execute the close ax application on certain conditions, so that i have used the .bat file to execute the same.

1) How to create bat file?

  1. Open notepad and enter the command that you have to execute.
  2. As I have to execute the close command for ax i used the following line of code.
         @echo off
          taskkill /F /im Ax32.exe

     3. "Save As" the notepad file with selection of "Save As Type:" : "All files" and enter file name with .bat extension.

2) How to call bat file from ax application ?
    I have executed the "Close application code" on the button click.
        void btnCloseAppl()
       str path;
       //Kindly check the path may be have to add '\' in between the path  



  1. wonderful information, I had come to know about your blog from my friend nandu , hyderabad,i have read atleast 7 posts of yours by now, and let me tell you, your website gives the best and the most interesting information. This is just the kind of information that i had been looking for, i'm already your rss reader now and i would regularly watch out for the new posts, once again hats off to you! Thanks a to once again, Regards, How to create batch file

    1. Thank you very much Nandkishor..