FAQ

How can I run programs that require arguments after the program name?

Simply add the arguments to the end of the command in the _items.ini file entry. For example

  edit_foo=notepad.exe "C:\Documents and settings\User\foo.txt"

Note the quotes " are generally needed where file paths contain spaces.

How can I run a batch file?

Batch files are text files containing sequences of commands to be run by the command line interpreter (CLI or shell). At the command prompt, or in a shortcut, they are run by entering their name. However the entries in _items.ini can only reference executable programs.

The solution is simple - you run the CLI executable passing it the batch file to be run as an argument. For example on XP

  run_foo=C:\windows\system32\cmd.exe /c "C:\Documents and settings\User\Desktop\foo.cmd"

The exact location of cmd.exe varies between versions of Windows. The /c option will run the batch file and close the command window when it has finished, thus causing Maavis to wait before restoring access to the buttons, just as it does with executables. There are many subtleties and traps when writing batch files but care, experience and perseverance usually pay off. For example some batch files may return, leaving a program running or they only work when the current directory is the folder they are in. It is thus beneficial to test batch files outside Maavis first.