Batch File for Firing Up AX 2012

By Eric Newell | November 5, 2012

I use my laptop for many things - actually, scratch that, I use it for everything.  Because of this, I load everything possible onto my laptop - media editing software, Visual Studio, all the Office tools (including Project, Visio, SharePoint Designer and Workspace) and, of course, I loaded SQL so I could load Dynamics AX 2012.

I have a Sony VAIO Z Series laptop, which is easily the lightest and best laptop I've ever owned, and it's been perfoming great, but I was noticing it was starting to get warm and the hard drive light was on more than necessary.  When I looked at the Resource Monitor I noticed AX, SQL and SQL Reporting Services were taking up about 1 GB of my 8 GB of memory.  They weren't consuming much in the way of processor time, but I thought, if I don't need them running all the time (which I don't), why not shut them down and create a batch file to kick off AX when I need it.

I changed my services settings to set SQL, SQL Agent, SQL Reporting Services and AX to manual so they wouldn't have to boot up right away (this saved me a few seconds on boot-up too).  Now my laptop is cooler than before and the battery life is better, and if I need to launch AX, I'm only 40 seconds away from it starting, thanks to this batch file.

@echo off 
net start mssqlserver 
timeout 3 
net start sqlserveragent 
timeout 3 
net start reportserver 
timeout 3 
net start AOS60$01 
timeout 15 
start ax32

I saved that text as a file called StartAX.bat and placed it in my main document folder.  I then created a shortcut file on my desk to that batch file so I could have it run with admin privileges by default.  To do this, click the "Advanced" properties under the shortcut file to have it run with elevated privileges.  I also renamed it to "Start AX" so it's pretty easy to see what I need to do on my desktop.

I also created a batch file to stop all the services, and it only has one line - net stop mssqlserver /y - that will shut down all associated services.

As I was trying to put this together I noticed the commands for SQL had changed from previous versions, and I didn't realize at first that AX would launch just by typing the ax32 command.  I hope this helps you to be able to run AX on your laptop without having to overheat your machine when you're not using it.

Eric Newell

Under the terms of this license, you are authorized to share and redistribute the content across various mediums, subject to adherence to the specified conditions: you must provide proper attribution to Stoneridge as the original creator in a manner that does not imply their endorsement of your use, the material is to be utilized solely for non-commercial purposes, and alterations, modifications, or derivative works based on the original material are strictly prohibited.

Responsibility rests with the licensee to ensure that their use of the material does not violate any other rights.

Start the Conversation

It’s our mission to help clients win. We’d love to talk to you about the right business solutions to help you achieve your goals.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!