Wednesday, March 07, 2012

windows variables

use %%A within batch files and %A outside in the shell

automatic windows VPN/PPP dial using rasdial

rasdial %CONNECTION_NAME% username password

windows awk using for /f command

example:
C:\Documents and Settings\Ali>for /f "tokens=15 delims= " %A in ('ipconfig ^| find "192.168.7"') do @set GW=%A

windows extract ip address from command line

for /f "tokens=15 delims= " %A in ('ipconfig ^| find "192.168.7"') do @set GW=%A