IP Changer

Oleno

Solid State Member
How would I make a program to change my IPV4 IP adress without changing my subnet mask, gateway, and DNS? I want it to change my IP to 100.100.100.100(Example) without changing my subnet, gateway, and DNS. Any help is appreciated. I'd like to put it in a bat file, but I don't know what to write.
 

Oleno

Solid State Member
Thanks for your quick reply. What I really want to do is set this command to port forward on the PCs IP.
piczo -add -app minecraft -lanip o.o.o.o -tcpport 25565 -q
piczo -add -app minecraft -lanip o.o.o.o -udpport 25565 -q
Instead of being 0.0.0.0 for the IP I was wondering if there was a way to replace it with the current IP. I want it to get the IP automatically.
 

Oleno

Solid State Member
Yeah, that's what I'm looking for thanks. I still don't know how to put it in string to replace the 0.0.0.0 though.
Right now I have this
Code:
ipconfig | find "IPv4"
But it gives me my local area connection, my wireless connection, and my virtual box ip. I want it to replace the 0.0.0.0 with my wireless area connection. Sorry if i'm hard to understand i'm still new at this and i'm not really good at explaining.
 

carnageX

Private Joker,
Staff member
You need to assign the IP into a variable, and then in your other command, i would be

-lanip %ipv4%
 

Oleno

Solid State Member
Is there a way to check if your running the cmd prompt as an admin? I want to do something like this.

If RunAsAdmin=true (
) ELSE (
)
 
Last edited:
Top