xboxscene.org forums

Author Topic: Let's Fix This Script Guys 4 Dash Installer  (Read 132 times)

Yuyu

  • Archived User
  • Hero Member
  • *
  • Posts: 908
Let's Fix This Script Guys 4 Dash Installer
« on: January 20, 2004, 07:35:00 AM »

CODE
BeginDraw UseCurrent
  MessageBox "Retail HD Setup for MXM$eol$ as your Default Dash"
EndDraw
DELAY 10
GOTO Start

:Start
BeginDraw UseCurrent
  MessageBox "To Begin Setup Press X$eol$To Cancel Press B"
EndDraw
Input
If %_GP_X% == "1" GOTO Begin
If %_GP_B% == "1" GOTO QUIT
GOTO Start

:Begin
CallScript _Prepdrives
GOTO Msdash1

:Msdash1
BeginDraw UseCurrent
  MessageBox "Do you need the MS Dash Installed?$eol$$eol$Press X to Install$eol$Press B to Skip"
EndDraw
Input
If %_GP_X% == "1" GOTO Audiofold
If %_GP_B% == "1" GOTO Partition
GOTO Msdash1

:Audiofold
SETFUNC AUDIODIR FileExists C:/Audio
IF# %AUDIODIR% == 0 GOTO Fontsfold
IF# %AUDIODIR% == 1 GOTO Delaudio

:Delaudio
RmDir C:/Audio
Goto Fontsfold

:Fontsfold
SETFUNC FONTDIR FileExists C:/fonts
IF# %FONTDIR% == 0 GOTO Xodashfold
IF# %FONTDIR% == 1 GOTO Delfonts

:Delfonts
RmDir C:/fonts
Goto Xodashfold

:Xodashfold
SETFUNC XODASHDIR FileExists C:/xodas*
IF# %XODASHDIR% == 0 GOTO Xbefile
IF# %XODASHDIR% == 1 GOTO Delxodash

:Delxodash
RmDir C:/xodas*
Goto Xbefile

:Xbefile
SETFUNC XBEFIL FileExists C:/*.xbe
IF# %XBEFIL% == 0 GOTO Xtffile
IF# %XBEFIL% == 1 GOTO Delxbe

:Delxbe
Delete C:/*.xbe
Goto Xtffile

:Xtffile
SETFUNC XTFFIL FileExists C:/*.xtf
IF# %XTFFIL% == 0 GOTO Msdash2
IF# %XTFFIL% == 1 GOTO Delxtf

:Delxtf
Delete C:/*.xtf
Goto Msdash2

:Msdash2
MOUNT D:
Copy D:\MXMINSTALL\ALL\C\ C:\
Copy D:\MXMINSTALL\ALL\E\ E:\
Chmod 777 C:\xboxdash.xbe
GOTO Partition

:Partition
BeginDraw UseCurrent
  MessageBox "Which partition does your BIOS$eol$Boot from?$eol$Press B for E:"
EndDraw
Input
If %_GP_X% == "1" GOTO Defcfile
If %_GP_B% == "1" GOTO Defefile
GOTO Partition

:Defcfile
SETFUNC DEFCFIL FileExists C:/default.xbe
IF# %DEFCFIL% == 0 GOTO Mxmcfile
IF# %DEFCFIL% == 1 GOTO Deldefc

:Deldefc
Delete C:/default.xbe
Goto Mxmcfile

:Mxmcfile
SETFUNC MXMCFIL FileExists C:/mxm.xml
IF# %MXMCFIL% == 0 GOTO Scripcfold
IF# %MXMCFIL% == 1 GOTO Delmxmc

:Delmxmc
Delete C:/mxm.xml
Goto Scripcfold

:Scripcfold
SETFUNC SCRIPCDIR FileExists C:/MXMScripts
IF# %SCRIPCDIR% == 0 GOTO Partc
IF# %SCRIPCDIR% == 1 GOTO Delscripc

:Delscripc
RmDir C:/MXMScripts
Goto Partc

:Partc
MOUNT D:
Copy D:\default.xbe C:\default.xbe
Chmod 777 C:\default.xbe
Copy D:\MXMINSTALL\MXM\C\mxm.xml\ C:\mxm.xml
Chmod 777 C:\mxm.xml
Copy D:\MXM\RETAIL\ C:\
GOTO Renamec

:Defefile
SETFUNC DEFEFIL FileExists E:/default.xbe
IF# %DEFEFIL% == 0 GOTO Mxmefile
IF# %DEFEFIL% == 1 GOTO Deldefe

:Deldefe
Delete E:/default.xbe
Goto Mxmefile

:Mxmefile
SETFUNC MXMEFIL FileExists E:/mxm.xml
IF# %MXMEFIL% == 0 GOTO Scripefold
IF# %MXMEFIL% == 1 GOTO Delmxme

:Delmxme
Delete E:/mxm.xml
Goto Scripefold

:Scripefold
SETFUNC SCRIPEDIR FileExists E:/MXMScripts
IF# %SCRIPEDIR% == 0 GOTO Parte
IF# %SCRIPEDIR% == 1 GOTO Delscripe

:Delscripe
RmDir E:/MXMScripts
Goto Parte

:Parte
MOUNT D:
Copy D:\default.xbe E:\default.xbe
Chmod 777 E:\default.xbe
Copy D:\MXMINSTALL\MXM\E\mxm.xml\ E:\mxm.xml
Chmod 777 E:\mxm.xml
Copy D:\MXM\RETAIL\ E:\
GOTO Renamee

:Renamec
BeginDraw UseCurrent
  MessageBox "What filename does your$eol$BIOS boot from?$eol$$eol$Press X for mxmdash.xbe$eol$Press Y for avadash.xbe$eol$Press B for evoxdash.xbe$eol$Press A for xboxdash.xbe"
EndDraw
Input
If %_GP_X% == "1" GOTO Mxmc
If %_GP_Y% == "1" GOTO Avac
If %_GP_B% == "1" GOTO Evoxc
If %_GP_A% == "1" GOTO Xboxc
GOTO Renamec

:Mxmc
Rename C:\default.xbe C:\mxmdash.xbe
GOTO Restart

:Avac
Rename C:\default.xbe C:\avadash.xbe
GOTO Restart

:Evoxc
Rename C:\default.xbe C:\evoxdash.xbe
GOTO Restart

:Xboxc
Rename C:\xboxdash.xbe C:\msxboxdash.xbe
Rename C:\default.xbe C:\xboxdash.xbe
GOTO Restart

:Renamee
BeginDraw UseCurrent
  MessageBox "What filename does your$eol$BIOS boot from?$eol$$eol$Press X for mxmdash.xbe$eol$Press Y for avadash.xbe$eol$Press B for evoxdash.xbe$eol$Press A for xboxdash.xbe"
EndDraw
Input
If %_GP_X% == "1" GOTO Mxme
If %_GP_Y% == "1" GOTO Avae
If %_GP_B% == "1" GOTO Evoxe
If %_GP_A% == "1" GOTO Xboxe
GOTO Renamee

:Mxme
Rename E:\default.xbe E:\mxmdash.xbe
GOTO Restart

:Avae
Rename E:\default.xbe E:\avadash.xbe
GOTO Restart

:Evoxe
Rename E:\default.xbe E:\evoxdash.xbe
GOTO Restart

:Xboxe
Rename E:\default.xbe E:\xboxdash.xbe
GOTO Restart

:Restart
BeginDraw UseCurrent
  Messagebox "Done. When DVD tray opens remove install disk$eol$Xbox will Power Off then turn back On$eol$This will run the MXM new user setup"
EndDraw
DELAY 10
TrayOpen
DELAY 10
PowerCycle

:Quit
QUIT






EDIT: Note that some stuff does function correctly, such as th end of the script does open the tray and powercycle and stuff like that, but, for the most part, it errors out...Never works properly all the way through...
Logged

Yuyu

  • Archived User
  • Hero Member
  • *
  • Posts: 908
Let's Fix This Script Guys 4 Dash Installer
« Reply #1 on: January 20, 2004, 08:58:00 AM »

Yeah, I have that fixed now in the script, but, to say the least it still does not work, I accidentally copied an older version of the script but to say the least, it still does not work with the // fixed, its the actual workings of the script I was looking to have fixed not the //.
Logged

DBZRacer

  • Archived User
  • Full Member
  • *
  • Posts: 239
Let's Fix This Script Guys 4 Dash Installer
« Reply #2 on: January 20, 2004, 12:24:00 PM »

At a glance it looked ok. Where exactly are you running into problems?

One suggestion is to collect all the info up front and storing them in variables before executing anything... You never know when newusers want to change their minds...
Logged