Вопрос

I'm looking to be able to start Wamp Server and after it loads apache and mysql have chrome automatically open up with a url of the local server.

So essentially all that a person would need to do is to click on the wamp server icon and my localwebsite loads up in a browser automatically.

Is this possible?

I was looking at the wampmanager.ini file and trying some lines under

;WAMPSTARTUPACTIONSTART
Action: run; FileName: "D:/Programs/wamp/bin/php/php5.4.12/php-win.exe";Parameters: "refresh.php";WorkingDir: "D:/Programs/wamp/scripts"; Flags: waituntilterminated
Action: resetservices
Action: readconfig;
Action: service; Service: wampapache; ServiceAction: startresume; Flags: ignoreerrors
Action: service; Service: wampmysqld; ServiceAction: startresume; Flags: ignoreerrors
;WAMPSTARTUPACTIONEND

But i get errors.

Это было полезно?

Решение

OK, thats an interesting idea.

The problem you are having is that you should not edit the wampmanager.ini file, as this is rebuilt from wampmanager.tpl each time you start WAMPManager or do a right click -> refresh on the wampmanager icon, the Green W icon.

So edit \wamp\wampmanager.tpl

Change this section from this original state ( back it up first )

[StartupAction]
;WAMPSTARTUPACTIONSTART
Action: run; FileName: "${c_phpCli}";Parameters: "refresh.php";WorkingDir: "${c_installDir}/scripts"; Flags: waituntilterminated
Action: resetservices
Action: readconfig;
Action: service; Service: wampapache; ServiceAction: startresume; Flags: ignoreerrors
Action: service; Service: wampmysqld; ServiceAction: startresume; Flags: ignoreerrors
;WAMPSTARTUPACTIONEND

to this

[StartupAction]
;WAMPSTARTUPACTIONSTART
Action: run; FileName: "${c_phpCli}";Parameters: "refresh.php";WorkingDir: "${c_installDir}/scripts"; Flags: waituntilterminated
Action: resetservices
Action: readconfig;
Action: service; Service: wampapache; ServiceAction: startresume; Flags: ignoreerrors
Action: service; Service: wampmysqld; ServiceAction: startresume; Flags: ignoreerrors
Action: run; FileName: "${c_navigator}"; Parameters: "http://localhost/phpmyadmin/"; Flags: ignoreerrors
;WAMPSTARTUPACTIONEND

Change the Parameters: "http://localhost/phpmyadmin/"; to the url of the site you want to auto load. I just used phpmyadmin as a example.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top