Heads Up – Windows 10 Anniversary Update and Smart Office JScripts

Microsoft has recently started rolling out the Windows 10 Anniversary Update – which is great, however it does cause an issue with Smart Office and JScripts.

Smart Office will download the .js from the server, it will go through some of the compile phases, however it doesn’t produce the final .dll which Smart Office attempts to load and generates an exception similar to this:

MForms.Render.RenderEngine.PostRender Failed to run scripts
System.IO.FileNotFoundException: Could not load file or assembly <path to .dll>

and of-course the script doesn’t run. If you are using precompiled .dlls directly, then they work without issue.

Infor released Smart Office hotfix 17 for 10.2.1 last week which looks like it has resolved the issue. Once applied Smart Office will show a version of

This entry was posted in Development, M3 / MoveX. Bookmark the permalink.

4 Responses to Heads Up – Windows 10 Anniversary Update and Smart Office JScripts

  1. elly van vaerenbergh says:

    Hi, we are experiencing the same issue. (windows 10, smart office We create the .js and then install in smart office. But how can we create, precompile this to get a .dlls ? Thank you

    • potatoit says:

      Smart Office retrieves the scripts for the M3 UI Adapter (assuming you don’t have the local script reg set). It them compiles them in to an assembly in the %temp% directory on the local machine. Once compiled Smart Office will load the Assembly, then execute the Init() method.

      So, on a machine that is working –
      1). clear the %temp% directory
      2). load the panel with the script. You will see that there is a .dll that has a randomly generated name.
      3). rename that randomly generated .dll to be the name of your script (eg. if the script was helloworld.js would be rename this .dll to helloworld.dll)
      4). copy the .dll to the mne\JScripts directory
      5). change the users personalisation to reference the .dll (eg. helloworld or helloworld.js will become helloworld.dll). It is important to have the .dll extension as Smart Office assumes that the scripts will be .js.

      Though I didn’t actually try myself, you can probably load the script in to the Smart Office JScript Editor (mforms://jscript) and hit compile – I imagine that this will also generate the .dll in the temp directory.

      If you’re really bored, you could explore using the .Net JScript compiler to automate the compilation – it’s included in the .Net framework.

  2. Elly Van Vaerenbergh says:

    Thanks a lot for your answer. We will try the steps you propose.

  3. Elly Van Vaerenbergh says:

    Issue is solved now, scripts work again in windows 10 version 1703. Thank you !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s