Launching MacImage With a Command Line

Summary:  Launching MacImage with a command line. Automatically opening the application by a double-clic on a project icon. Command line creation, file insertion, project refreshing, project compilation to produce the image file.

Homepage (entry point of the Web site)

MacDisk, a solution to transfer data files between Mac and PC

MacImage and how to produce Mac CD-ROMs on a PC

To order on-line your copy of a program

To download demo (trial) versions and other tools

Technical support, FAQs, Hints and tips

Site Map : treeview of all pages composing our Web site

Site Search by keywords

Introduction
Even if MacImage is a Windows application with a GUI (Graphical User Interface), it may be useful, for some tasks, to launch it with a command line.
This is what happens, behind the curtain, when you double-click on the icon of a project file. As MacImage registered its file extensions (*.mipr, *.hfs and *.isop) with Windows, the Explorer launches MacImage when the user double-clicks on an icon.
The command line can be more useful, yet.
MacImage offers three command line functions (switches):

  • Files and Folders Inclusion (-i)
  • Project Refreshing (-r)
  • Project Compilation (-c)

Files and Folders Inclusion (-i)
Command line example:

macimage -i e:\projects\file.mipr c:\temp\folder\file.ext

In this command line, MacImage opens the project named file.mipr (or creates it if it doesn't exist) and includes the following item, c:\temp\folder\file.ext. This item is a file in this example, but could be a folder. In such a case, all files and folders contained within the folder are also included.
It is also possible to use a file containing the list of the files or folders to include in the project.
Command line example:

macimage -i e:\projects\file.mipr $c:\temp\folder\file.ext

Note in this example the presence of the dollar sign in front of the file name. In such a case, MacImage opens the file and includes the files and folders listed in it (with full access path).

Inclusion in the ISO View Only (-ii)
Command line example:

macimage -ii e:\projects\file.mipr c:\temp\folder\*.*

This command line tells the program to add the whole content of the folder named "folder" to the project, but only in the ISO view. Note the use of the syntax "*.*" to include all files.
You could also use a pattern like "*.doc", etc.

Inclusion in the HFS View Only (-ih)
Command line example:

macimage -ih e:\projects\file.mipr c:\temp\mac\*.*

Similarily, this command line includes the content of the folder named "mac" to the HFS view of the project.

Project Labelling
Command line example:

macimage -l e:\projects\file.mipr "Name with spaces"

This command line gives the label to both views. There is also a variant '-li' to only label the ISO view and '-lh' to only label the HFS view.

Project Refreshing (-r)
It happens frequently that the contents of the original hard disk changes between the project creation and the image compilation.
The interactive version of MacImage offers two features coping with this aspect of things: Project Refreshing and Folder Refreshing.
There is also a command line version.
Command line example:

macimage -r e:\projects\file.mipr

MacImage opens the project named file.mipr and updates the dates and size of all files, and the contents of all folders (which are handled as if the Refresh contents flag was set).
With this feature, you can for instance publish a periodic CD-ROM with a folder whose contents changes with each issue. You build a CD-ROM project with a place holder (an empty folder for the changing contents), then, for the actual production, put the files to be included in the folder (or rename the actual folder with the place holder name) and refresh the project before compiling it.
Please note that refreshing to delete files and folders in the project file is useless, since MacImage silently ignores files and folders which don't exist anymore at compile time.

Project Compilation (-c)
Command line example:

macimage -c e:\projects\file.mipr

MacImage opens the project file (file.mipr) and compiles it, producing a file named file.iso.

Command Line Burning
Using a command line burning software like the cdburn.exe or the dvdburn.exe utilities distributed by Microsoft in its Windows 2003 Resource Kit (only installs under Windows XP and later, but also runs under Windows 2000), you could launch the compilation and the burning in one batch file containing only two lines, which could be:

macimage -c e:\projects\file.mipr
cdburn d: file.iso -speed max

Frequent Error Causes
When you use several command lines in a batch file, don't forget to give a full access path for the project file and for the data files.
The execution of a line can change the default current folder and the program may therefore not be able to find again the project file created the line above.

Logiciels & Services Duhem
9, rue de Bruxelles - F-75009 Paris (France)
Tel. (+33) [0]149 700 455 - Fax (+33) [0]149 700 456
SIRET 381 149 996 00039 - EEC VAT FR32 381 149 996
email : sales (at) macdisk.com - web : http://www.macdisk.com
© Pierre Duhem 2008 - All trademarks acknowledged.
MacDisk is a trademark or a registered trademark of L&S Duhem under certain jurisdictions.
Any comments are welcome.