For as long as I've been developing ColdFusion (and now Railo) I've always had a few batch files to start/stop and restart my web services:
My restart script for example will shutdown my SQL and web server (in this case MSSQL and IIS) and Railo and restart them all.
net stop "W3SVC" net stop "MSSQLSERVER" net stop "RAILO" net start "W3SVC" net start "MSSQLSERVER" net start "RAILO"
I have a simple AutoHotkey script that will run this with a single keypress:
Note: I'm using a Microsoft Natural keyboard with several additional function keys and have this mapped to the '=' key on the number pad.
;numpad= run "C:\scripts\batch\railo_restart.cmd" return
Unfortunately my laptop is locked down and I need to "Run as administrator" which requires me to
Turns out the solution was fairly simple...
(I'm using Windows 7 btw)
Now tweak the AutoHotkey script to point to the shortcut instead
;numpad= run "C:\scripts\batch\railo_restart - Shortcut.lnk" return
Now when I click the '=' key on my keyboard the script fires off with no prompts or confirmations, running as adminstrator!
Comments disabled for this post. Still want to bug me about it? Hit me up on one of the social sites listed to the right.Tweet