[web2py] Re: Bypassing Opening Dialog in Windows Binary Startup

2015-05-02 Thread Arglanir
I have a custom starting script that I can share:

@echo off

rem Some variables...
set PORT=8002
set pidfile=web2py.pid
set mycommand=web2py_no_console.exe
set adminpassword=your_password
set urltodisplay=http://127.0.0.1:%PORT%/

rem Restarting Web2Py?
if exist %pidfile% (
echo Stopping currently running Web2py...
call __STOP.cmd # killing it
)

rem Starting Web2Py ?
netstat -an | FINDSTR :%PORT% | FINDSTR LISTENING  ECHO .  ECHO Port 
%PORT% is already in use. Please change starting script and relaunch it.  
start notepad %0  Pause  EXIT 1

rem Starting Web2Py ?
start %mycommand% -i 0.0.0.0 -p %PORT% -a %adminpassword% -d %pidfile% -l 
web2py.log

rem Waiting then display page 
echo Server is starting, please wait...
ping -n 4 127.0.0.1  NUL

rem launching page
start %urltodisplay%
echo If application is not starting, please visit %urltodisplay%
echo Otherwise feel free to close this window...
pause

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Bypassing Opening Dialog in Windows Binary Startup

2015-04-30 Thread Scott Hunter
This can be accomplished by modifying *gluon.widget.py* (for example, 
opening the browser in a thread before starting the server), but that would 
violate the license (as I understand it) for using the web2py binaries, and 
I don't see any way around that.

On Wednesday, April 29, 2015 at 8:44:55 AM UTC-4, Scott Hunter wrote:

 If I run the Windows Binary without supplying an administrator password on 
 the command line, web2py presents a dialog from which you can change the 
 server address, port  admin password before starting the server; when the 
 server is started, it opens its home page in the default browser, printing 
 the console message:* starting browser*

 If the admin password *is* supplied at the command line, it skips the 
 dialog, and does not open a page in a browser,  and the console message 
 instead reads:  *use tasks /f /pid  to shutdown the web2py server*

 Is there a way to avoid the startup dialog yet still have the home page 
 open in a browser?

 - Scott


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.