Let's make sure that "wit" is properly installed first. From the download package, run the "windows-install.exe" file. It adds the path environment variable for "wit" to make it available anywhere in the console. Now open "cmd" and type "wit". If this works, proceed with the next step.
In your current working directory, create a new file called "runCmd.bat" while ".bat" is the file extension. Right-click it and choose "edit". Type "@cmd", save and exit. If you double-click the file it'll open up "cmd" in the current folder. This is useful because we can now use relative paths in our commands.
In order to extract an ISO, we need the "wit extract" command. Here's the documentation about it:
http://wit.wiimm.de/wit/cmd-extract.html
Let's assume the ISO is called "MWR.iso" and is in the same directory as our "runCmd.bat" file. We want to extract to a new folder in this directory called "Extracted". The command for this will look like this:
Once this is done, we can proceed to copy a modified file over to replace a source file. In order to do this using the command line, we need "xcopy". The following command copies the file "common_level_temp_mp.ff" from the current directory to the folder "english" in "files" and finally in "Extracted".
To rebuild our modified ISO, we'll use the wit copy command. Again, here's some documentation about it: http://wit.wiimm.de/wit/cmd-copy.html
In our example we've got the source "Extracted" and the target "MWR.iso". To allow overwriting, we need the "--overwrite" flag. According to Wiimm, to speed it up a bit we'll force hard links using the flag "--links".
In your current working directory, create a new file called "runCmd.bat" while ".bat" is the file extension. Right-click it and choose "edit". Type "@cmd", save and exit. If you double-click the file it'll open up "cmd" in the current folder. This is useful because we can now use relative paths in our commands.
In order to extract an ISO, we need the "wit extract" command. Here's the documentation about it:
http://wit.wiimm.de/wit/cmd-extract.html
Let's assume the ISO is called "MWR.iso" and is in the same directory as our "runCmd.bat" file. We want to extract to a new folder in this directory called "Extracted". The command for this will look like this:
- Code:
wit extract "MWR.iso" "Extracted"
Once this is done, we can proceed to copy a modified file over to replace a source file. In order to do this using the command line, we need "xcopy". The following command copies the file "common_level_temp_mp.ff" from the current directory to the folder "english" in "files" and finally in "Extracted".
- Code:
xcopy "common_level_temp_mp.ff" "Extracted\files\english\common_level_temp_mp.ff" /Y
To rebuild our modified ISO, we'll use the wit copy command. Again, here's some documentation about it: http://wit.wiimm.de/wit/cmd-copy.html
In our example we've got the source "Extracted" and the target "MWR.iso". To allow overwriting, we need the "--overwrite" flag. According to Wiimm, to speed it up a bit we'll force hard links using the flag "--links".
- Code:
wit copy "Extracted" "MWR.iso" --overwrite --links