xboxscene.org forums

Author Topic: Change Gateway And Ip Address Via Script  (Read 108 times)

cabal90210

  • Archived User
  • Newbie
  • *
  • Posts: 1
Change Gateway And Ip Address Via Script
« on: December 08, 2003, 08:25:00 AM »

Sometimes I unhook my xbox from the network and use a crossover cable instead, the speed increase is amazing (i have a 10mbit hub on my network...)

Anyways, to do this, right now I FTP in, download mxm.xml, edit the default gateway (it needs to be the same as the ip address for crossover cables), then upload the mxm.xml back!  

Is there a way to change this via an actionscript, so all i have to do is select a menu option?
Logged

DBZRacer

  • Archived User
  • Full Member
  • *
  • Posts: 239
Change Gateway And Ip Address Via Script
« Reply #1 on: December 08, 2003, 08:42:00 AM »

You can use the newuser actionscript posted on allxboxskins.com. KF just implemented the virtual keyboard on it as well.

Just keep in mind that it will re-write your mxm.xml file using the settings you choose from the script.

Edit: I forgot the ipchaner script that KF created. You might want to try that first instead.  :D  

This post has been edited by DBZRacer: Dec 8 2003, 05:00 PM
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Change Gateway And Ip Address Via Script
« Reply #2 on: December 08, 2003, 09:40:00 AM »

You could also make an ActionScript that changes the MXM.XML to your "fixed" values and reboots. Shouldn't be too hard.
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
Change Gateway And Ip Address Via Script
« Reply #3 on: December 08, 2003, 11:56:00 AM »

for something like this, i would do like BJ suggested, and create two mxm.xml's with the different values for the desired  network settings.   then just use the script to switch between the two (look at DBZRacers Newsfeed switch script for an example).

Logged

Mordenkainen

  • Archived User
  • Sr. Member
  • *
  • Posts: 447
Change Gateway And Ip Address Via Script
« Reply #4 on: December 09, 2003, 03:53:00 AM »

Probably poorly written but.......


CODE


Enable/Disable Internet Access

Set GW "192.168.1.1"
Set BadGW "192.168.1.2"
XMLOpen netsettings e:\mxm\mxm.xml
XMLGetValue netsettings CurGW !.Network.DefaultGateway
if %CURGW% == %BADGW% goto on
:off
XMLSetValue netsettings !.Network.DefaultGateway %BADGW%
callscript _DisplayMessagebox "Gateway removed."
goto finish
:on
XMLSetValue netsettings !.Network.DefaultGateway %GW%
callscript _DisplayMessagebox "Gateway set to %GW%."
:finish
XMLSave netsettings e:\mxm\mxm.xml
XMLClose netsettings
reboot




See if that does ya!

Morden.

This post has been edited by Mordenkainen: Dec 9 2003, 11:54 AM
Logged