McStas logo McStas - A neutron ray-trace simulation package ILL; PSI; ESS Niels Bohr Institute DTU Physics NEXMAP


About McStas
 Conditions of use
 Project funding

 Linux Install (deb/rpm)
 Mac OS X Install
 Unix Install (src code)
 Windows Install
 Other Downloads (share)

Mailing list

Search web/mailinglist

 McStas manual
 Known problems
 C Compilers




Report bugs


McStas Ubuntu live-dvd

McStas Windows installation instructions

The distribution packages for McStas may be downloaded via

Installing McStas 2.2a and later on Windows

See bottom of page for known issues for this platform.


  • Download and install
    • The provided Strawberry Perl package, which also contains the gcc compiler. IMPORTANT: Please uninstall any older version of Perl before attempting to install the McStas bundle!
    • The provided McStas metapackage - important: Right-click and 'Run as Administrator', otherwise you easily get some of the known issues listed below!
    Screenshots of the installation process are available below. (NOTE: Because of problems with the 64 bit gcc on windows, we only provide a 32bit version on windows!
  • The McStas meta package contains:
    • Strawberry Perl 5.18, also including the gcc compiler.
    • McStas-specific extensions to Perl 5.18
    • McStas code generator, components, instruments and datafiles
    • The "classic" McStas perl tools
    • PGPLOT and Gnuplot graphical backends for mcplot/mcdisplay
    • Our set of complementary Python tools (optional use), for which you need to install the dependencies below.
  • Optional Pyhton dependencies:
  • Optionally install iFit to visualize results using a Matlab environment (for free, no license needed).
  • Optionally install a VRML/X3D plotter such as Freewrl or InstantReality.
  • Optionally, you can install the NeXus format libraries to be able to export data files in HDF5.

The Windows installation bundle has no configurable options and defaults to install McStas in

Start it after installation by using the desktop links mcstas-2.2a-shell and mcgui-2.2a.

Installation screenshots

Screenshot from the Perl installation:

Starting Perl installation (not needed if Perl 5.18 is already installed - but please remove any OLDER version of Perl before starting this install):

Accept Perl license:

Perl directory location:

Perl installation go:

Install process:

Finishing Perl install (no need to view the README file):

Screenshot from the McStas metapackage installation:

Starting the installation:

Dependency overview:

Installation go:

Extracting files:

Unpacking and installing Perl extensions (two terminal windows may appear):

Completing installation:

After installation two Desktop shortcuts should appear (You MUST use these to start the installed version of McStas as McStas is not installed on the Window system PATH):

Please report any trouble in using these instructions to

Known issues for the Windows platform:

  • You will have issues with Perl if more than one version of Perl is installed at the same time. Please
    • Use the windows add/remove software tool to remove any older version of Perl before installing a new McStas
    • Please fully remove both of the folders c:\perl and c:\strawberry before installing a new McStas
  • Our tool set does not fully support working directories including spaces or other non-ascii characters. If you have an older Windows system with a user account in c:\Documents and Settings we advice you to create and use a working directory on the root of the drive e.g. c:\McStaswork
  • We suggest to use our 32bit package for windows 64 also, since we feel the 64-bin gcc on windows is not mature - gives problems in a few, specific cases. In any case, the 32-bit McStas for windows works perfectly fine on a 64-bit operating system!
  • If you are not able to start any simulation from mcgui - only getting back the mcrun --help or the text "press any key to continue", your Perl is likely not registered access all commandline parameters. This can be remedied by
    • Starting the regedit.exe program
    • Searching for keys with content C:\strawberry\perl\bin\perl.exe
    • Ensure that any entry like that includes a final %* like this:
      HKEY_CLASSES_ROOT\Applications\perl.exe\shell\open\command = "C:\strawberry\perl\bin\perl.exe" "%1" %*
  • If you experience strange behavior from perl/mcgui on Windows like
    1. ppm shell not being able to install the extra Perl packages, i.e. no Tk module on the Perl PATH
    2. mcgui not being able to run / compile a simulation (all you get is mcrun -- help output)
    3. mcgui not being able to access local component files
  • - Then the solution can be to ensure your user has "full control" to the executables in c:\strawberry\perl\bin (Right-click the folder, Properties, Security, Authenticated users -> Edit)
Last modified: Tue Feb 16 06:07:06 ART 2016

Last Modified: Tuesday, 16-Feb-2016 10:09:13 CET
Search website mailinglist archive GitHub repos