by JustMe » 24. March 2010 17:22
Hi all,
Well I didn't think what I wanted was that hard and it might have been nice if someone had pointed me in the right direction. Anyway, should anyone search for this (I did first) and not find what they wanted (I didn't), here are the answers.
Don't go to the Apache.org site because they tell you how to do it with a standard install, which XAMPP doesn't do (this is not bad, just FYI)
Here is the code for a batch file that will
1) Start Apache and MySql
2) Load the control pannel
3) Run Netbeans (or change it to your editor of choice)
4) Not wait for you to exit any of those before it will exit (say for an autoexec script)
5) Note that the last use of start uses a path directive as well as the shortcut (.lnk) instead of calling the .exe directly. This approach allows you to configure the shortcut to run the way you want using the shortcut (vs. command line args).
REM Start Apache with no new window
call C:\xampp\apache_start.bat < crlf.txt
REM Start MySQL
call C:\xampp\mysql_start.bat < crlf.txt
REM start the control panel minimized
start "Startup Title" /MIN "c:\xampp\XAMPP-Control.exe"
start "Startup Title" "c:\Program Files\Mozilla Firefox\firefox.exe"
start "Startup Title" /D "C:\Users\developerAcct\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\netbeans\" "NETBEANS.LNK"
A couple of things. The crlf.txt file simply gets around the PAUSE in the XAMPP batch files. I could have edited those, but this way, I can reinstall and not have to remember to edit them again.
You can get info on START by just entering Start /? at a command prompt.
In my case, when my computer starts, it checks the domain. If I am at a clients where we use LAMP, then this script runs. Otherwise, whatever sript that is appropriate will run. I also use SET directives instead of actual paths so that those to can be configured by the environment.
ANyway, feel free to contact me if you want more details.
JustMe