xboxscene.org forums

OG Xbox Forums => Official MediaXMenu (MXM) Forum => Dashboard Forums => MXM ActionScripting Forum => Topic started by: cabal90210 on December 08, 2003, 08:25:00 AM

Title: Change Gateway And Ip Address Via Script
Post by: cabal90210 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?
Title: Change Gateway And Ip Address Via Script
Post by: DBZRacer 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
Title: Change Gateway And Ip Address Via Script
Post by: BenJeremy 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.
Title: Change Gateway And Ip Address Via Script
Post by: koldfuzion 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).

Title: Change Gateway And Ip Address Via Script
Post by: Mordenkainen 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