Jump to content

Default Gateway, need to convert my batch script into AutoIT...


spoon
 Share

Recommended Posts

Hi guys,

Here is my code that I have been using in most of my batch scripts to obtain default gateway and do simple if a equals b do c etc.

for /f "tokens=2 delims=:" %%i in ('"ipconfig | findstr Gateway | findstr 10."') do set GW=%%i
if "%GW%"==" 10.58.56.1" set SITECODE=BHR

Does anyone have any idea on how to push these two lines into AutoIT? I have seen few topics talking about default gateway and how to get it but most scripts are 15+ lines which doesn't seem right.

I would really appreciate some help.

cheers,

Adrian

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...