Add shortcut to windows hosts file
Posted by: h2n1 (---.lightspeed.snjsca.sbcglobal.net)
Date: July 27, 2009 10:53PM

In the tray menu, we have shortcuts to apache and php config files, and the www directory. Is there a way to have a shortcut in there to point to C:\Windows\System32\drivers\etc\hosts ? Right now I just have a shortcut on my desktop, but thought it'd be nice if it was with the other shortcuts in the wamp tray menu. If there is not a way to add onto wamp's icon tray menu, do you think it'd be a good idea for a future wamp?

Options: ReplyQuote
Re: Add shortcut to windows hosts file
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: July 27, 2009 11:11PM

u can add it on the menu in c:/wamp/wampmanager.tpl



find the line for opening the httpd.conf file and copy it below it chaning the file path..



its not a bad idea but people have already built scripts that autpmatically add a line to the hosts file for each folder found in the www folder when wamp starts so its a lil behind that

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Add shortcut to windows hosts file
Posted by: h2n1 (---.lightspeed.snjsca.sbcglobal.net)
Date: July 27, 2009 11:26PM

Thanks a lot! It worked. I searched for "httpd", copied that line to the next line, and modified it a bit. Here is what I used if anyone else is curious:

Type: item; Caption: "Windows hosts file"; Glyph: 6; Action: run; FileName: "notepad.exe"; parameters:"C:\Windows\System32\drivers\etc\hosts"

Of course, you'll need to restart wamp or right click on the icon and click "refresh".

Options: ReplyQuote
Re: Add shortcut to windows hosts file
Posted by: toumimi (---.116.116-78.rev.gaoland.net)
Date: July 28, 2009 06:05AM

Note that if you were under Vista, this solution doesn't work, because you need to execute notepad with admin privileges...

Florian

WampServer Patch (Screenshots)
Topic EN : www.wampserver.com
Topic FR : www.wampserver.com

Options: ReplyQuote


Sorry, only registered users may post in this forum.