Greg MacLellan wrote: > One of the problems I've run into is with laptops .. they often don't > have a (wireless) network connection when the services start (eg, wpkg), > so wpkg never actually runs. I solved this by using srvany to run a > script that pings the server, and waits for a response before starting > wpkg > (http://wpkg.org/index.php/Installation_instructions_-_mixed_environments), > but it might be a good feature to include in this installer.
Should be fairly easy to delay it with the current installer - just add a "Execute before" script which instructs to wait. The script could be located on the local workstation/laptop. You could put there something as easy as below: ping -n 20 127.0.0.1 Perhaps something more intelligent would be better though. A rework of the script you posted on the page above: it should take two arguments: server name/IP and maximum delay: cscript %PROGRAMFILES%\wpkg\invoke-wpkg.js 192.168.200.100 30 Which you put into "Execute before". > Of course, > it would need to be implemented so if the server was unreachable at > startup, it would allow the user to login immediately. When the > connection is established and wpkg actually runs, if there isn't a > logged in user, they should also be prevented from logging in at that > point (that may be harder to do..). When the "Execute before" is executed, the service will try to execute cscript \\server\path\wpkg.js /your /flags Of course, if \\server is unreachable, user will not be unnecessarily delayed - you will find in Windows Event Log that WPKGService couldn't connect to a network drive. > I also have users that rarely log off (especially with laptops, and I'm > definitely guilty of that), so I also schedule a 3am run of wpkg > /synchronize (not using the server ping stuff, if it can't run then, it > just doesn't run). Might be a good option to have in your installer as > well (as a /daily:0300 parameter for example). Task Scheduler is for these things IMHO, we shouldn't reproduce the system's functionality. And you can add such a task from command line (or using WPKG as execute="once"). (just invoke: net stop "WPKG service" / net start "WPKG service"). -- Tomasz Chmielewski http://wpkg.org ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ wpkg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wpkg-users
