I've made my first script. I've searched the help but really couldn't find a method to
declare folders, how to make my ms script a mzp self installing file and so on. The sources I've read say different things (for example the path to place the ms file in).
Any suggestion would really help me shed some light on the problem.
Replies
An MZP file is a zip file with the extension renamed. The easiest method I've found to use MZP files is to have it launch another maxscript and then let that finish the work. Inside the MZP file you should have a file named mzp.run with contents similar to this:
The mzp.run file is capable of doing more operations, but I haven't had much success with that. That's why I just have it run another MaxScript. You can have installer_mytool.ms delete any previous verion, copy the script to the proper location, evaluate the file, and finally prompt that installation failed or was successful.
Unzip the mzp in separate folder. You will find all files that monster mentoined. The install.ms uses some DOS commands and creates new folders, move the ms, mcr. and icon files etc.
Also, you can download ToTex and take a look into his install.ms file - HiddenDOSCommand is used.
Oitliner ver 2 have installe.ms that is use dotNet for createing folders.
Get what is best for you and use it.
P.S. you can use the mzp.run to create folders and move the files, but in Win Vista, Win7, you have to ruun the max and the MZP as adnimistrator.
1. Put your script and icon files in a zip file and rename it to mzp.
2. Write a text file with instructions to copy the folder contained in the mzp file to windows temp directory. You can't
do it directly,you must delegate another ms.file (already stored in the mzp file). Save this as mzp.run
Example
name "John Doe"
Version Beta
extract to $temp/johndoe
run "johndoeinstaller.ms"
drop "johndoeinstaller.ms"
clear temp
3.Compile the delegate johndoeinstaller.ms file that shall do the installation operations like copying files and so on. Here I'm lost again.
Can you suggest some info on this?
For exampel RTTAssist installer:
the mzp.run code
The RTTAssistInstall file that do the installation - copy files, create directories.
This installer uses some DOS commands
The Totex installer uses HiddenDosCommand
The Outliner installer uses dotnet
Just check the codes and use what is best for you