How to setup EMC for Windows

I downloaded the windows EMC (emc_win32_v9.4.4_20210801), and added the eviroment varible:
EMC_ROOT D:\emc_win32_v9.4.4_20210801\scripts;D:\emc_win32_v9.4.4_20210801\bin.

However, when I start EMC by emc_setup.pl bulk, error message occurs ‘emc_setup.pl’ is not the interal or exteral commands.

Another problem
When I executed the conmand “emc_setup.pl bulk” successfully, I got the files bulk.in and build.emc.
While when I executed the conmand “emc_win32 build.emc”, error messages occurs:
Error: core/format.c:359 FormatOpen:
Error opening file “D:/emc_win32_v9.4.4_20210801/scripts,D:/emc_win32_v9.4.4_20210801/bin,/field/opls/2012/opls-ua.prm”.
Program aborted.

Your error occurs, because you set multiple values simultaneously in your EMC_ROOT environment variable, which together do not constitute to a valid path.

The environment variable EMC_ROOT should point to the root directory of EMC. For example, if you would like to install EMC v9.4.4 on a Windows drive D: in directory emc, you change the directory to D:\emc and unpack the distribution there. This unpacks EMC in subdirectory v9.4.4. In this case, you would set EMC_ROOT to

D:\emc\v9.4.4

If you want for EMC to be executed without having to type the full path, you would have to add

D:\emc\v9.4.4\bin
D:\emc\v9.4.4\scripts

to the environment variable PATH. When referring to environment variables, Windows uses %-s, e.g. the PATH variable can be printed by typing

echo %PATH%

at a command prompt.

Environment variables can be changed as follows:

  1. Type ‘advanced system settings’ in the search option box next to the Windows icon and press enter, which opens the ‘System Properties’ window
  2. Click on ‘Environment Variables’, which opens the ‘Environment Variables’ window

The ‘Environment Variables’ window consists of two sections: ‘User variables’ and ‘System variables’. I would suggest adding and changing values under ‘User variables’. Add a new EMC_ROOT environment variable as follows:

  1. Click New at the ‘User variables’ section, which opens the ‘New User Variable’ window
  2. Enter EMC_ROOT in the variable name field
  3. Enter D:\emc\v9.4.4 in the variable value field
  4. Click OK at the bottom of the ‘New User Variable’ window to confirm your entries, which closes the window

Add the EMC scripts and bin directories as follows:

  1. Double click the Path entry under ‘User variables’, which opens the ‘Edit environment variable’ window
  2. Click New
  3. Enter D:\emc\v9.4.4\bin and press enter after typing
  4. Click New again
  5. Enter D:\emc\v9.4.4\scripts and press enter after typing
  6. Click OK at the bottom of the ‘Edit environment variable’ window to confirm the added paths, which closes the window

Finally, click OK at the bottom of the ‘Environment Variables’ window to confirm your choices. Typically, all edits are not stored if the latter is not performed.

I would suggest installing Strawberry Perl (https://strawberryperl.com), if your system does not have a version of Perl installed.

Thank you for your detailed description on EMC. According to your constructive advice, I have solve this problem. Thank you again!