|
MPath
In most cases, companies delivering MATLAB/Simulink solutions require
their end users to manually modify their MATLAB path. OR, the user
must run a provided m-file utility which modifies their path for them.
MPath can eliminate these nuisances!
What is MPath?
MPath is a FREE, powerful installation utility. It gives any organization delivering a MATLAB solution on Windows the ability to modify MATLAB's path environment without any requirements upon the end user. MPath can also:
- be used to remove path(s) by using the REMOVE command word. This can be useful if your installer provides uninstallation options.
- MPath works with v5.0 and later.
- If there is more than one MATLAB installed, MPath finds the last one executed in the registry and then modifies the associated pathdef.m file.
- The path(s) inserted are formatted to all lower-case letters and DOS tilde format to allow for spaces.
- All path(s) are added to the end of the path list.
- MPath will not add duplicate path(s).
How does MPath work?
MPath investigates the registry to determine the location of MATLAB, seeks out the pathdef.m file, makes a back-up copy, and then adds the desired paths to the pathdef.m file. All of this takes place in a matter of seconds!
Should you use MPath?
If your organization wants to reduce the number of steps it takes a user to discover your solution, then MPath can do just that....and it is FREE!
Using MPath
Currently, MPath is used with InstallShield Express, but because it is an executable program, it can be used with any install package that allows for the execution of external programs.
MPath Calling Convention mpath -command ADD -path <path1> -command
ADD -path <path2> ... -command ADD -path <pathN>
MPath Quick Test
Assuming mpath.exe is in your root directory and MATLAB is shutdown.
- Select Run from your Start Menu and enter the following:
- c:\mpath.exe -command ADD -path c:\windows -command ADD -path c:\temp
- Start MATLAB and type:
- Use PATHTOOL to permanently remove the two paths you just added.
Using MPath in InstallShield Express v2.12
- Create a group called "Installation" and add the mpath.exe file to it.
- Under Express Extensions on the Ordering Tab, specify when you want mpath.exe to be executed during the installation.
- Under the Settings Tab, browse to your Installation folder and select mpath.exe.
- Under Optional Prorgam Parameters, enter
Using MPath in InstallShield Express v3.03 & v3.5
- Select Custom Actions.
- In the design pane in the middle, right-click on Custom Actions and select New .EXE
- In the design pane on the right, for File Name, browse to mpath.exe.
- Specify Command Line as
- -command ADD -path [INSTALLDIR]
- Finally, select when mpath.exe should be Invoked.
- Repeat these steps for the Uninstallation, but replace ADD with REMOVE.
|