Changes

Jump to: navigation, search

WPKG over VPN

515 bytes added, 11:10, 12 January 2009
m
no edit summary
I have configured all computers to have GPO startup script to run this script. This scripts calls '''wpkg-start.bat''' only if a computer is present on local subnet (C class) and doesn't have an IP belonging to VPN IP pool. I'm running a small OpenVPN client set. All updates to this script or the whole concept are welcome!
=Changes=
*VPN VBs script now called within batch file (keeps main WPKG shell window hidden)
 
==check-vpn.vbs==
<source lang="vb">
On Error Resume Next
Subnet="192.168.10."
IPStart=245
IPEnd=252 LocalNetwork=0254
For Each adapter in colItems
if Host >= IPStart and Host <= IPEnd then
'NO-WPKG: VPN connection present Wscript.Quit0
else
LocalNetwork='START-WPKG: local network present Wscript.Quit 1
end if
end if
Next
'stop if we're not on NO-WPKG: local subnetnetwork not present</source>if LocalNetwork=0 then=wpkg-start-vpn-bat==<source lang="vb">cls  Wscript:: This is a recommended way of starting WPKG.Quitend   :: Use WPKGROOT variable to define where wpkg.js script is.   :: Use PACKAGES variable to define where all your software/installers are. :: You can later use the PACKAGES variable (and all other variables) in your xml files.  set WPKGROOT=\\tpsrv05\wpkg$ set SOFTWARE=%WPKGROOT%\content  cscript %WPKGROOT%\check-vpn.vbs if ERRORLEVEL 0 GOTO END  %WPKGROOT%\wpkg.js /synchronize /quiet /nonotify
dim shellset shell=createobject("wscript.shell")shell.run "\\vboxsrv\wpkg\wpkg-start.bat"set shell=nothing:END
</source>
[[Category: Documentation]]
23
edits

Navigation menu