Jump to content
Sign in to follow this  

One Script For Multiple Installs Based On Ip Address

Recommended Posts

We have a customised application that has been developed in house.

It basically intergrates with office and setups certain functions/settings for each office location (i.e template locations)

At the moment, when a PC is built, the tech is required to run the specific install for the office the pc is going to be used in i.e:

Office 1 --> App\Office1\setup.exe

Office 2 --> App\Office2\setup.exe

Each office has a unique IP address range and I was wondering if it would be possible to use AutoIT to:

1: Determine what office the PC is located in (based on IP)

2: Run the required setup.exe for the office

This would allow the application to be installed via one link and not require the tech/user to hunt for the specific setup.exe for their office

This is day 1 of me using AutoIT so I apologise if this is a no brainer. Any help is gladly received, and if you are ever in Perth WA then it's my shout.


Share this post

Link to post
Share on other sites

Well, you can use @IPAddress1 (as well as 2-4) to get the IP address assigned to your NIC(s). You could then use StringLeft() and StringInStr() to pull out the subnet if you want to use that as your comparison. As an example, the following code will return the first two octets of your IP address. In my case, it returnes 192.168.

stringleft(@ipaddress1, stringinstr(@ipaddress1, '.', 0, 2)-1))

Share this post

Link to post
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
Sign in to follow this  

  • Create New...