Paul
New Member
Posts: 1
|
Post by Paul on Apr 3, 2019 14:05:54 GMT
Hi,
I'm looking to check whether VPN is connected during Preflight.
VPN uses a unique gateway within our organisation, so I’ve been trying to use the following to validate if this:
CheckCondition='"%XIPGateway%" <> "OurGatewayIPAddress"' (where OurGatewayIPAddress represents the IP address of our VPN gateway).
The issue I have is that the XIPGateway value is set to two comma separated IP address when VPN is connected.
The first IP gateway is our wireless network and the second is the VPN network.
Is there a method of trimming the XIPGateway variable prior to it being evaluated by CheckCondition?
Thanks in advance.
Paul
|
|
|
Post by Jason on Apr 16, 2019 2:35:20 GMT
Yes, just use the VBScript "Right" function:
CheckCondition='Right(%XIPGateway%,15) <> "OurGatewayIPAddress"'
This assumes your gateway IP is 15 characters long so you'll need to adjust that.
Alternatively, you could use the VBScript "Split" function but that would get messy because of short-comings in the VBScript language.
|
|