We help IT Professionals succeed at work.

Run batch file on XP startup

Medium Priority
Last Modified: 2012-05-06
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.
Watch Question

Speshalyst Tech Support professional

please look at item 8 on this list..
once done.. you could exclude ur servers from being affected by this GPO
Speshalyst Tech Support professional

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.
Top Expert 2009
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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.