Hi Brian, probably the easiest solution would be to make the shortcut key do different things depending on the MoI version that it is running inside of.
That would be like this:
script: if ( moi.majorVersionNumber == 3 ) { moi.ui.alert('running in v3'); } else if ( moi.majorVersionNumber == 4 ) { moi.ui.alert('running in v4'); }
Then that way you don't have to have separate moi.ini files just to have that one thing different.
If you do want to have separate moi.ini files there are a couple of ways to do that.
One is to move the moi.ini file to be in the install directory in the same location as MoI.exe . If MoI finds a moi.ini file there it will use that instead of getting it from %appdata%\moi . However, by default Windows restricts programs running at a regular privilege level from modifying the contents of the Program Files directory so you would need to run MoI at an elevated privilege level for it to be able to save your settings out. You would do that by setting the "Run as administrator" option in the properties of the shortcut you use to launch MoI.
Then the other way is that you can pass the path to a moi.ini file to MoI.exe as a command line parameter, putting " " around it if there are any spaces in the path. When MoI.exe is given a command line parameter that ends in ".ini" it will use that as the .ini file for reading and writing settings. You could have it in the regular appdata folder and name it moiv4.ini for example.
Hope that helps!
- Michael
|