| Windows 7: [Help] Modifications in a batch file |
04 May 2009
|
#1 | | Windows Seven Manaus, Amazonas |
[Help] Modifications in a batch file Quote: ipconfig /release
netsh interface ip set address offboard static 111.111.111.111 255.0.0.0
netsh interface ip set address offboard dhcp
ipconfig /renew Anyone could help me to make this a working file at Windows Seven?
I used it on XP to change my IP until now, but when I try to run now it doesn't work
Obs: Offboard is the name of the connection | My System Specs |
| OS Windows Seven CPU Athlon 64 x2 5200+ Motherboard AMD690GM-M2 Memory 2x 2GB 800Mhz Corsair Graphics Card ATI Sapphire HD 2600xt GDDR4 Screen Resolution 1024*768 Hard Drives Maxtor 250GB Internet Speed 500K |
05 May 2009
|
#2 | | Windows 7 Ultimate x64 SP1 Somewhere on the 3rd rock from the sun. |
Try this: Code:
ipconfig /release
netsh interface ip set address "Offboard" static 111.111.111.111 255.0.0.0
netsh interface ip set address "Offboard" dhcp
ipconfig /renew Of course it might work without the quotation marks, but if the name is Offboard then you'll need it capitalized correctly for it to work, IIRC.
Also, the help info in the command shows some other options as well that you might want ot take a look at - in *particular* if the OS is still *internally* recognizing the connection as "Local Area Connection": Code: C:\>netsh interface ip set address -?
Usage: set address [name=]<string>
[[source=]dhcp|static]
[[address=]<IPv4 address>[/<integer>] [[mask=]<IPv4 mask>]
[[gateway=]<IPv4 address>|none [gwmetric=]<integer>]
[[type=]unicast|anycast]
[[subinterface=]<string>]
[[store=]active|persistent]
Parameters:
Tag Value
name - Interface name or index.
source - One of the following values:
dhcp: Enables DHCP for configuring IP addresses for
the specified interface.
static: Disables DHCP for configuring IP addresses for
the specified interface. This value must be
specified if an address or a gateway is being
configured.
address - IPv4 address to add or modify, optionally followed by
the subnet prefix length.
mask - The IP subnet mask for the specified IP address.
gateway - One of the following values:
<IPv4 address>: A specific default gateway for the
static IP address you are setting.
none: No default gateways are set. This is the default.
gwmetric - The metric for the default gateway. This field should
be set only if gateway is specified.
type - One of the following values:
unicast: Marks the address as a unicast address.
This is the default.
anycast: Marks the address as an anycast address.
subinterface - LUID of the subinterface on which the default gateway
exists. This parameter is only needed on interfaces
with multiple subinterfaces.
store - One of the following values:
active: Set only lasts until next boot.
persistent: Set is persistent. This is the default.
Remarks: Used to enable or disable DHCP for IP address configuration.
Also removes any previous static IP addresses and default gateways,
and can add a new static IP address and default gateway.
Examples:
set address name="Local Area Connection" source=dhcp
set address "Local Area connection" static 10.0.0.9 255.0.0.0 10.0.0.1 1 | My System Specs | | Computer type PC/Desktop System Manufacturer/Model Number The Beast Model V OS Windows 7 Ultimate x64 SP1 CPU Core i7 965 EE @3.6 GHz Motherboard eVGA x58 Classified3 Memory 3 * 4GB Mushkin Enh Redline CL7 DDR3 1600 MHz (PC3-12800) Graphics Card eVGA 560 Ti 448 Core Classified + eVGA GTX260 SSC (PhysX) Sound Card Realtek HD Audio (on-board) Monitor(s) Displays 2 * Acer X213Wbd Screen Resolution 2 * 1680 x 1050 Keyboard Logitech G15 Keyboard Mouse Logitech Performance Mouse MX PSU ThermalTake BlackWidow TX TR2 850 W Case ThermalTake Level 10 GT (Black) Cooling Corsair H100 CPU | 2 * TT 140mm TriLED | 2 * Antec TriCool Hard Drives 1 * Intel Cheryville 520 180 GB SATA III SSD |
1 * Intel X-25M G2 80 GB SATA II SSD |
2 * Seagate 1 TB 32MB Cache 7200.12 SATA II Mech. Internet Speed Cable - 35 Mbit down / 12 Mbit up advertised (30 / 6 act.) Antivirus M$Se / MBAM Pro / WinPatrol Pro Browser Chome(dev) / Canary / Firefox Minefield / Opera Next / IE 10 Other Info Wacom Bamboo Touch |
Hauppauge WinTV-HVR-1850 |
Optimus STAV-3400 AV Receiver |
Bose 301 Series III Speakers (Main channel) |
Bose 161 Speakers (Surround) |
Optimus 3 way 100-W speaker (Center) |
Logitech Clearchat PC Wireless Headset |
Koss ProDJ 100 Headphones |
Microsoft LifeCam Studio |
Motorola Droid BIONIC |
ASUS Transformer Infinity 64GB |
06 May 2009
|
#3 | | Windows Seven Manaus, Amazonas |
Still doesn't work, the lines: Quote: netsh interface ip set address "Offboard" static 111.111.111.111 255.0.0.0
netsh interface ip set address "Offboard" dhcp I don't get any response even in cmd
I think it might have something to do with IPv6/Ipv4
At XP, the adapter only have IPv4 I think | My System Specs | | OS Windows Seven CPU Athlon 64 x2 5200+ Motherboard AMD690GM-M2 Memory 2x 2GB 800Mhz Corsair Graphics Card ATI Sapphire HD 2600xt GDDR4 Screen Resolution 1024*768 Hard Drives Maxtor 250GB Internet Speed 500K |
07 May 2009
|
#4 | | Windows 7 Ultimate x64 SP1 Somewhere on the 3rd rock from the sun. |
Correct.
When I did the commands to figure out the help, ip as an option is not actually listed - only ipv4 and ipv6 are listed, leading me to think that substituting ipv4 for ip should do the trick.
however, when I manually typed in ip as an option it brought up the help info for it, almost as if it is a hidden option....
Unless, of course, 7 is defaulting ip to refer to ip6....which could be *another* reason you're not getting a response at all.... | My System Specs | | Computer type PC/Desktop System Manufacturer/Model Number The Beast Model V OS Windows 7 Ultimate x64 SP1 CPU Core i7 965 EE @3.6 GHz Motherboard eVGA x58 Classified3 Memory 3 * 4GB Mushkin Enh Redline CL7 DDR3 1600 MHz (PC3-12800) Graphics Card eVGA 560 Ti 448 Core Classified + eVGA GTX260 SSC (PhysX) Sound Card Realtek HD Audio (on-board) Monitor(s) Displays 2 * Acer X213Wbd Screen Resolution 2 * 1680 x 1050 Keyboard Logitech G15 Keyboard Mouse Logitech Performance Mouse MX PSU ThermalTake BlackWidow TX TR2 850 W Case ThermalTake Level 10 GT (Black) Cooling Corsair H100 CPU | 2 * TT 140mm TriLED | 2 * Antec TriCool Hard Drives 1 * Intel Cheryville 520 180 GB SATA III SSD |
1 * Intel X-25M G2 80 GB SATA II SSD |
2 * Seagate 1 TB 32MB Cache 7200.12 SATA II Mech. Internet Speed Cable - 35 Mbit down / 12 Mbit up advertised (30 / 6 act.) Antivirus M$Se / MBAM Pro / WinPatrol Pro Browser Chome(dev) / Canary / Firefox Minefield / Opera Next / IE 10 Other Info Wacom Bamboo Touch |
Hauppauge WinTV-HVR-1850 |
Optimus STAV-3400 AV Receiver |
Bose 301 Series III Speakers (Main channel) |
Bose 161 Speakers (Surround) |
Optimus 3 way 100-W speaker (Center) |
Logitech Clearchat PC Wireless Headset |
Koss ProDJ 100 Headphones |
Microsoft LifeCam Studio |
Motorola Droid BIONIC |
ASUS Transformer Infinity 64GB |
07 May 2009
|
#5 | | Windows 7 Ult x64(x2), HomePrem x32(x4), Server 08 (+VM), 08 R2 (VM) , SuSe 11.2 (VM), XP 32 (VM) In a ∞ Portal |
yes you should be using instead of ip ipv4...
like this... Code: netsh int ipv4 set addr "Offboard" static 111.111.111.111 255.0.0.0
netsh int ipv4 set addr"Offboard" dhcp | My System Specs | | System Manufacturer/Model Number Tx2500z Tablet Pc/Homemade Server OS Windows 7 Ult x64(x2), HomePrem x32(x4), Server 08 (+VM), 08 R2 (VM) , SuSe 11.2 (VM), XP 32 (VM) CPU Turion X2 ultra (oh well came with laptop)/P4 @3.2 (yes P4) Motherboard IDK HP Motherboard / Intel DG965SS Memory OCZ Dual Channel 4GB kit/ 1gb Dual Channel Graphics Card HD 3200 graphics /GMA x3100 (yay for intergrated!!) Sound Card Realtek HD Audio(mic working, well sort of)/Siig IC-70012 Monitor(s) Displays built-in Hp 12" laptop screen/ Acer 19" Screen Resolution 1280x800 /1440x900 Mouse Logi MX Rev. /MS Wheel Optical 1.1A /Logitech Optical Mouse Cooling All Air Cooled Internet Speed College baby but its still routed through vpn to 1536k... Other Info love my wacom pen and pressure sensitivity...
wished it worked in 7, SUSE for that matter though |
07 May 2009
|
#6 | | Windows Seven Manaus, Amazonas |
OK
Now I can do the primary objective (change the ip to a static one then dhcp it)
But can't trick the internet company anymore T_T
When I set dhcp, it comes back to the same IP
But with XP I always got a "new" one
I'll try to find another way to change my IP,
Thanks anyway | My System Specs | | OS Windows Seven CPU Athlon 64 x2 5200+ Motherboard AMD690GM-M2 Memory 2x 2GB 800Mhz Corsair Graphics Card ATI Sapphire HD 2600xt GDDR4 Screen Resolution 1024*768 Hard Drives Maxtor 250GB Internet Speed 500K |
16 May 2009
|
#7 | | Windows Seven Manaus, Amazonas |
Hello,
I'm here again, just need to know something, how do I deactivate the "preferred" IP thing?
I don't want for windows to log the last ip, so when I do the ipconfig/release-renew thing it gets another IP by DHCP
I know that in my internet provider I can do such thing (I did that a lot on XP) Quote: IPv4 Address. . . . . . . . . . . : 192.168.0.10(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0 | My System Specs | | OS Windows Seven CPU Athlon 64 x2 5200+ Motherboard AMD690GM-M2 Memory 2x 2GB 800Mhz Corsair Graphics Card ATI Sapphire HD 2600xt GDDR4 Screen Resolution 1024*768 Hard Drives Maxtor 250GB Internet Speed 500K |
16 May 2009
|
#8 | | Windows 7 Ult x64(x2), HomePrem x32(x4), Server 08 (+VM), 08 R2 (VM) , SuSe 11.2 (VM), XP 32 (VM) In a ∞ Portal |
you are using a router yes?
if you are then the this is a IP for your network (any computers that you own and are connected to your router are part of this network)
otherwise (if you dont have a router) then your this IP is being routed internally (the ISP/building is using NAT routers) and this is not a "outside" Internet IP...
this usually happens when you have a small ISP or a ISP that is running out of external ip address and now to conserve its share may now be routing them... | My System Specs | | System Manufacturer/Model Number Tx2500z Tablet Pc/Homemade Server OS Windows 7 Ult x64(x2), HomePrem x32(x4), Server 08 (+VM), 08 R2 (VM) , SuSe 11.2 (VM), XP 32 (VM) CPU Turion X2 ultra (oh well came with laptop)/P4 @3.2 (yes P4) Motherboard IDK HP Motherboard / Intel DG965SS Memory OCZ Dual Channel 4GB kit/ 1gb Dual Channel Graphics Card HD 3200 graphics /GMA x3100 (yay for intergrated!!) Sound Card Realtek HD Audio(mic working, well sort of)/Siig IC-70012 Monitor(s) Displays built-in Hp 12" laptop screen/ Acer 19" Screen Resolution 1280x800 /1440x900 Mouse Logi MX Rev. /MS Wheel Optical 1.1A /Logitech Optical Mouse Cooling All Air Cooled Internet Speed College baby but its still routed through vpn to 1536k... Other Info love my wacom pen and pressure sensitivity...
wished it worked in 7, SUSE for that matter though |
16 May 2009
|
#9 | | Windows Seven Manaus, Amazonas |
If I change the mac of my network board the IP will change, but its too complicated...
I'm not using any router, the computer is the same way I used to do when it was XP, it's something in seven's configuration,
When I was in dual-boot with XP i could change the IP only doing that thing I posted in the beginning of the topic, but I formated the XP partition and now I'm lost...
I need something to make Seven forget the old IP and get any other avaliable in the provider instead of the same...
This is my real IP, the other was just an example: Quote: IPv4 Address. . . . . . . . . . . : 201.75.107.73(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.248.0 Sorry if I can't express myself clearer, English is not my first language :P | My System Specs | | OS Windows Seven CPU Athlon 64 x2 5200+ Motherboard AMD690GM-M2 Memory 2x 2GB 800Mhz Corsair Graphics Card ATI Sapphire HD 2600xt GDDR4 Screen Resolution 1024*768 Hard Drives Maxtor 250GB Internet Speed 500K |
18 May 2009
|
#10 | | Windows Seven Manaus, Amazonas |
| My System Specs | | OS Windows Seven CPU Athlon 64 x2 5200+ Motherboard AMD690GM-M2 Memory 2x 2GB 800Mhz Corsair Graphics Card ATI Sapphire HD 2600xt GDDR4 Screen Resolution 1024*768 Hard Drives Maxtor 250GB Internet Speed 500K [Help] Modifications in a batch file problems? All times are GMT -5. The time now is 01:59 AM. | |