Jump to content

Utilities: ComputerID & IPSet


Recommended Posts

ComputerID

Small utility to identify computers. You supply parameters, ComputerID compares them with current computer. Can be used for configuration tasks after OS is installed.

Requires NET Framevork 2.0 or higher to be installed and WMI related services running.

Command line options (all are optional, order is not important, not case-sensitive):

computerid.exe [mac=] [ip=] [name=] [vendor=] [model=] [mbvendor=] [mb=] [mbserial=]

mac = network adapter MAC address

ip = network adapter IP address

name = computer network name

vendor = manufacturer information from SMBIOS

model = model information from SMBIOS

mbvendor = mainboard manufacturer information from BIOS

mb = mainboard model information from BIOS

mbserial = mainboard serial number from BIOS

Example:

computerid.exe IP=10.0.1.141 Name=EDIJS-NB Vendor=IBM MB=23884SG MBSerial=1C56E44X0HV MAC=00:06:1B:C4:C3:80

If no command line options are supplied, lists identification information for current computer.

Quotation marks must be used if option contains spaces.

Example:

computerid.exe mbvendor="Intel Corporation"

Identifying result:

If current computer matches all supplied parameters - exitcode and command line output is "1". If not - "0".

ComputerID is not meant to work as standalone application, chosing how to retrieve result is up to you.

Available methods are reading exitcode, reading output, redirecting output to file, running app withot command line options and analyzing output in your own program.

ComputerID.zip

Link to comment
Share on other sites


IPSet

Utility for scripting IP parameters (needs more testing, lets call it beta version for now). Can be used for configuration tasks after OS is installed.

Requires NET Framevork 2.0 or higher to be installed and WMI related services running.

Features:

Setting basic IP parameters from command line

Conditional execution based on Computer name, MAC, IP, Adapter name, Subnet, Gateway, DNS match

Reading commands from file (usefull combined with conditional execution)

Full list of supported commands:

ipset.exe [save[=fullpath\filename]] [load[=fullpath\filename]]

[ifname=] [ifmac=] [ifeth=] [ifip=] [ifsub=] [ifgw=] [ifdns=]

[dhcp] [ip=] [dns=] [name=]

file operations

save[=fullpath\filename]

writes IP settings for all network adapters to file

(in "IFMAC= IP= sub= gw= dns=" format)

ipset.txt in ipset.exe folder is used if no filename is specified

load[=fullpath\filename]

reads file line by line and attemts to execute each one

ipset.txt in ipset.exe folder is used if no filename is specified

load command does not work from file

conditions to match

ifname= computer network name

ifmac= MAC address

ifeth= network adapter name

ifip= IP address

ifsub= subnet mask

ifgw= default gateway

ifdns= DNS server address

-Partial match works for ifeth. Example:

ifeth="NetXtreme" will match "Broadcom NetXtreme Fast Ethernet" adapter.

-ifmac, ifeth, ifip, ifsub, ifgw, ifdns must match a single adapter

For example if you have 2 network adapters:

1) ip=10.0.1.10 dns=10.0.1.1

2) ip=10.0.1.11 dns=10.0.1.2

this command will not execute since there is no unique match

ipset ifip=10.0.1.10 ifdns=10.0.1.2 ip=10.0.1.20

this command however, will change ip address of second adapter

ipset ifip=10.0.1.11 ifdns=10.0.1.2 ip=10.0.1.20

commands to execute

dhcp enable dhcp

ip= set IP address

gw= set default gateway

sub= set subnet mask

dns= set DNS server address

name= change computer network name

dhcp also enables dhcp for DNS servers

if ip= is used without specifying subnet mask, "255.255.255.0" is used

you can specify multiple DNS servers by using "/" as delimiter:

dns=10.0.1.2/10.0.1.3/10.0.1.4

other

can be used in interactive mode (when starting program without command line parameters)

list shows IP settings for all installed network adapters

select - prompts for adapter to work with

exit - exit program

Examples:

ipset ifip=10.0.1.144 ip=192.168.1.144 gw=192.168.1.1 dns=192.168.1.1-if network adapter with IP 10.0.1.144 is found on system, IP settings for that adapter are changed

ipset ifmac=01:00:1z:1x:1c:80 name=computer10

-if network adapter with given MAC address is found on system, rename computer to "compter10"

ipset ip=10.0.1.100 gw=10.0.1.1 dns=10.0.1.1

-sets provided IP settings to first network adapter

IPSet.zip

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
  • Recently Browsing   0 members

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