[wpkg-users] wpkg, windows 7 and wireless

Aaron Bliss aaron.bliss at gmail.com
Tue Sep 7 17:16:08 CEST 2010

Hi all,
I thought I would post to the list the solution that we have come up
with when dealing with laptops that only connect via wireless AP's.
Since wireless connections are generally managed by the end user, we
implemented the a batch script that is called via a scheduled task.
The scheduled task is executed using the built in SYSTEM account at

Here is the logic behind the batch script:

1. set the wpkg service to start type of manual
2. pause for 10 seconds
3. check for a route to www.yahoo.com.
4. If one does not exist, it will repeat steps 2 and 3
5. If a route exists (meaning that in the case of a wireless user they
have connected to an access point AND authenticated to the AP), the
script will break out of the loop and start the wpkg service

Here is the code:

@echo off

@rem set wpkg service to manual
sc config WpkgService start= demand

@rem wait until there is a reliable network connection
echo Waiting for wireless....
Ping -n 10  > nul
ping www.yahoo.com |find /i "reply" >nul
if errorlevel 1 goto waitloop

@rem then wait for 5 minutes, to ensure all related networking
components are now working properly
ping -n 1 -w 300000

@rem finally start the wpkg service
net start WpkgService

More information about the wpkg-users mailing list