Hi Len,
For seamless installation I guess you'd need a standalone installer script that asks MoI for the location of the appData directory, copies your files there, and maybe writes the path to moi.ini if the files are put in their own folder. I can't think of a way to add a command just by typing something in moi.ini
The closest thing I've done is a startup script that replaces a native file with my own by copying my html file from the startup scripts folder. That still requires manually navigating to the startup scripts folder to put the script and html there though.
code:
doReplacePromptSaveChanges();
function doReplacePromptSaveChanges() {
var existingName = moi.filesystem.getUiDir() + 'PromptSaveChanges.htm';
var backupName = existingName + '.bak';
var backupExists = moi.filesystem.fileExists( backupName );
if (backupExists === false) {
// backup PromptSaveChanges.htm
moi.filesystem.copyFile(existingName, backupName );
// overwrite PromptSaveChanges.htm
var replacerName = moi.filesystem.getAppDataDir() + 'startup/' + 'PromptSaveChanges.htm';
moi.filesystem.copyFile(replacerName, existingName );
}
}
- Peer
|