Bobby

Distinguished
Apr 9, 2004
287
0
18,780
Archived from groups: microsoft.public.windowsxp.general (More info?)

There is a way to use "netsh" to dump your configuration either dhcp or
static address. You can then change the file extension to a batch file and
just double-click on either and it will set your network adapter to those
properties.

I have seen this done before but can't get it to work. Someone help. Thanks
in advance.
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)

You need to be in the netsh interface ip context. The command you want is
'set address'. See:

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-
us/netsh.mspx

Doug Sherman
MCSE, MCSA, MCP+I, MVP

"Bobby" <blh_24@nospam_hotmail.com> wrote in message
news:emrlqrNnFHA.3552@TK2MSFTNGP10.phx.gbl...
> There is a way to use "netsh" to dump your configuration either dhcp or
> static address. You can then change the file extension to a batch file and
> just double-click on either and it will set your network adapter to those
> properties.
>
> I have seen this done before but can't get it to work. Someone help.
Thanks
> in advance.
>
>
 

Bobby

Distinguished
Apr 9, 2004
287
0
18,780
Archived from groups: microsoft.public.windowsxp.general (More info?)

Ive tried setting the adapter properties and then dumping the config. I
rename that file to batch but it doesnt change from dhcp to static. Cant
remember how it's done.



"Doug Sherman [MVP]" <dsherman@nospamtampabay.rr.com> wrote in message
news:%23itrR9OnFHA.3256@TK2MSFTNGP12.phx.gbl...
> You need to be in the netsh interface ip context. The command you want is
> 'set address'. See:
>
> http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-
> us/netsh.mspx
>
> Doug Sherman
> MCSE, MCSA, MCP+I, MVP
>
> "Bobby" <blh_24@nospam_hotmail.com> wrote in message
> news:emrlqrNnFHA.3552@TK2MSFTNGP10.phx.gbl...
>> There is a way to use "netsh" to dump your configuration either dhcp or
>> static address. You can then change the file extension to a batch file
>> and
>> just double-click on either and it will set your network adapter to those
>> properties.
>>
>> I have seen this done before but can't get it to work. Someone help.
> Thanks
>> in advance.
>>
>>
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)

Bobby wrote:

> Ive tried setting the adapter properties and then dumping
> the config. I rename that file to batch but it doesnt change
> from dhcp to static. Cant remember how it's done.
Hi,

You cannot rename the dump file to a batch file, but you can
import the dump by using the -f switch.


Here is a batch file example:

netsh.exe -f c:\netsh\ADSL_Netsh.dmp
@echo.
@echo.
ipconfig.exe /release
@echo.
@echo.
@echo Press any key to run ipconfig.exe /renew
pause
ipconfig.exe /renew
pause


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx
 

Bobby

Distinguished
Apr 9, 2004
287
0
18,780
Archived from groups: microsoft.public.windowsxp.general (More info?)

That's what I'm doing wrong then. However I know that what I saw before was
2 batch files (e.g. dhcp.bat. static.bat) you could click on either and it
would set your adapter properties. The netsh dump command was used to create
the output.



"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:OPHIoYQnFHA.1044@tk2msftngp13.phx.gbl...
> Bobby wrote:
>
>> Ive tried setting the adapter properties and then dumping
>> the config. I rename that file to batch but it doesnt change
>> from dhcp to static. Cant remember how it's done.
> Hi,
>
> You cannot rename the dump file to a batch file, but you can
> import the dump by using the -f switch.
>
>
> Here is a batch file example:
>
> netsh.exe -f c:\netsh\ADSL_Netsh.dmp
> @echo.
> @echo.
> ipconfig.exe /release
> @echo.
> @echo.
> @echo Press any key to run ipconfig.exe /renew
> pause
> ipconfig.exe /renew
> pause
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
> http://www.microsoft.com/technet/scriptcenter/default.mspx
 

Bobby

Distinguished
Apr 9, 2004
287
0
18,780
Archived from groups: microsoft.public.windowsxp.general (More info?)

Thanks for all the help. I found the article. You simply open notepad and
type in the command/s. Save as .cmd file and run it. It changes the adapter
properties. I actually saved as a batch file and placed each on the desktop.




"Bobby" <blh_24@nospam_hotmail.com> wrote in message
news:%23DUIldQnFHA.2904@TK2MSFTNGP14.phx.gbl...
> That's what I'm doing wrong then. However I know that what I saw before
> was 2 batch files (e.g. dhcp.bat. static.bat) you could click on either
> and it would set your adapter properties. The netsh dump command was used
> to create the output.
>
>
>
> "Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
> news:OPHIoYQnFHA.1044@tk2msftngp13.phx.gbl...
>> Bobby wrote:
>>
>>> Ive tried setting the adapter properties and then dumping
>>> the config. I rename that file to batch but it doesnt change
>>> from dhcp to static. Cant remember how it's done.
>> Hi,
>>
>> You cannot rename the dump file to a batch file, but you can
>> import the dump by using the -f switch.
>>
>>
>> Here is a batch file example:
>>
>> netsh.exe -f c:\netsh\ADSL_Netsh.dmp
>> @echo.
>> @echo.
>> ipconfig.exe /release
>> @echo.
>> @echo.
>> @echo Press any key to run ipconfig.exe /renew
>> pause
>> ipconfig.exe /renew
>> pause
>>
>>
>> --
>> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
>> Administration scripting examples and an ONLINE version of
>> the 1328 page Scripting Guide:
>> http://www.microsoft.com/technet/scriptcenter/default.mspx
>
>