Jump to content

Display the Subnet Mask


Recommended Posts

Hi,

Sorry to bother you with something which might seems to be so simple but i can't find a way to display de subnet mask of a computer.

I tried different thing but none of them worked.

Is there somebody who can help me ?

Link to comment
Share on other sites

The subnet-mask is network-specific (one pc can have multiple adapters each in another network): http://www.autoitscript.com/forum/index.php?showtopic=95901&view=findpost&p=689749

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

You will need everything. The information you need is fetched between

If Not @error Then (line 61)

and

ConsoleWrite($XML & @CRLF)(line 98)

The subnet mask is fetched here:

$XML &= _GetAllIPsXML(DllStructGetPtr($adapter, "IpAddressListNext"), "IP", False)

To get a simple array with all IPs and subnetmasks, use

$aIPs = _GetAllIps(DllStructGetPtr($adapter, "IpAddressListNext"))

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

I add those lines to your script

$aIPs = _GetAllIps(DllStructGetPtr($adapter, "IpAddressListNext"))

MsgBox(64,"Resultat du test permettant d'etablir un diagnostic de votre machine", & $aIPs)

and i get the following message:

Error:Variable used without being declared.

This message is for the first one !( of the two lines)

Edited by Kkweit
Link to comment
Share on other sites

In the example, I added Opt("MustDeclareVars",1). So you have to declare all variables before you can assgn a value. (or remove that line)

Also, $aIPs is an array, so your MsgBox wont't work, You can try _ArrayDisplay instead.

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

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...