[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 913
  • Last Modified:

Run batch file on XP startup

Client has a SBS 2003 server with XP computers. When two people are out a client they run an application that demands that they have static IP address. They can then use a x-over cable to connect the two computers together and share this application. I have created two batch files that each users runs. One batch file assigns and the other to there computers. I have created a third batch file that the user is suppose to run to reset there IP configuration back to DHCP. I have called this batch file BackinOffice.bat
netsh interface ip set address name = "Local Area Connection" source = dhcp
netsh interface ip set dns name = "Local Area Connection" source = dhcp
What seems to be happening is that the users are forgetting to run BackinOffice.bat before they shutdown their computers in field. So when they get back to the office and log in they have no access to any network recourses because our internal IP address scheme is 10.0.0.X.

I would like to have the BackinOffice.bat run on every computer when they boot up in the office automatically. Of course I would not this batch file to run on any of our three servers when they are rebooted. I am think that Group Policies is the best way to accomplish this but unsure of how to do this.

Thanks for your help.
  • 2
1 Solution
please look at item 8 on this list..
once done.. you could exclude ur servers from being affected by this GPO
If it is just those 2 users, you could go into TCP/IP properties and set their IP on the 10.0.0.x office network as static, then click the Advanced button and add 192.168.0.x a 2nd IP address to the NIC. Then there should be no extra configuration needed whether they are in or out of the office.
One these will do the trick.

Local machine startup script on the laptop. gpedit.msc
scheduled tasks to run at startup using SYSTEM account. SCHTASKS CREATE /?
When the IP is set to DHCP you could set an alternate IP when DHCP is not available it uses the static you assigned. Internet Protocol (TCP/IP) - Properties - Alternate Configuration

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now