IP Changer

Oleno

Solid State Member
Messages
9
Location
Canada
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.
 
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.
 
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.
 
You need to assign the IP into a variable, and then in your other command, i would be

-lanip %ipv4%
 
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:
Back
Top Bottom