Vbscript never finishes when running on the server


I’m trying to run a EasyMorph project that calls some sub processes in it. One of the process is a vbscript and it runs fine when I directly execute the EM project. However, the project never finishes when I try to run it on the server.

I noticed the wscript task in hanging in the task manager every time when I try to run it on the server. Can you please advise what is the correct way of running these kinds of projects?

Thank you.

Hi Ronnie,

a few questions:

  1. Is the problem remains when you use cscript.exe instead of wscript.exe?

  2. If yes, does your script have any instructions for interacting with user (e.g. Echo)?.

  3. Do all scripts never finish or just particular one? If it’s a particular script, can you please reduce it down to the shortest possible that still never finishes?


Hi Dmitry,

I didn’t specify the application as wscript or cscript in the code at first place. I removed the echo part of the script and tried to run a unit test of this script by setting up a separate EM project. it again runs fine when running directly in the EM project, but failed in the Server instance.

The issue seems to be that the server instance doesn’t have the proper access to the folder I’m trying to access. Please see logs in details.


The solution turns out to be rather unusual:

Assuming you’re using cscript.exe, you need to create an empty folder named Desktop in C:\Windows\System32\config\systemprofile. That’s it. That makes it work.

The solution was supposed to be for 32-bit Windows, but it actually worked in 64-bit Windows.

Found in this article.