Help - Search - Members - Calendar
Full Version: [WIN] shutdown scripts.
ieXbeta Board > Tech > Operating Systems
Fod
k i wanted to setup a simple script to release the IP on my desktop machine when i shutdown (my friend wants to swap the rj45 from my NIC to his laptop to use the net sometimes and we don't have a router to share sad.gif ). i tried making a .bat file containing the ipconfig /release command and added it to the shutdown scripts section of gpedit.msc, but the computer jusr hung when it got to 'running shutdown scripts' phase of shutdown. this is kinda the first time i'm trying this, so i take it i shouldn't be using a bat file? what should i be using?
Taco Bell
Probably a timing issue between when the batch file is executed and when the NIC driver is shutdown.

However, I'm not sure why you need to manually release it anyway if you're shutting down though because I would think that it would do so automatically.
Fod
this is what my ISP told me:
QUOTE
It is very important to release the IP address from PC1 before you attempt to swap the Cable Modem, as because PC2 is using a different NIC MAC address to PC1. When the modem attempts to "match" the two sets of details (the CM Mac address and the NIC MAC address) it will already see a lease assigned to your CM MAC address with a different NIC MAC address. The upshot of which is that you will be refused an IP lease and get a 169 IP address assigned.


so yeah i need to release the IP manually, so can anyone help with the script? the last resort will be for me to buy a wireless router and a wireless PCMCIA card for my friend (he's staying with us for a few months), but that'll set us back around £160 sad.gif
Taco Bell
If your diligent, you can probably make an alternative shutdown shortcut and use that.

Have it call a batch file which releases the IP address and then call the Windows NT Resource Kit's shutdown.exe utility. It will work on NT4, W2K, and XP.
Bilto
Win9X can be configured to automagically release the assigned IP, here's how.

Perhaps this will work for XP, perhaps not. Still, it might help you in your search.
Fod
thanks for the pointer bilto; yours is the most elegant solution i could find and for the moment it seems to work smile.gif no doubt it'll probbaly all blow up in my face in a few weeks time as usual. just another question: will i be able to add english keys into the registry of a german version of windowsXP, or will it not recognise it? (my mate's laptop is currently running a german version)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.