Error using 'Windows Script Host Object Model'.WshShell' on 2013 R2 RTC

wash64864wash64864 Member Posts: 13
edited 2016-06-30 in NAV Three Tier
I'm getting the following error after Notepad is closed and final command is executed successfully before returning to calling page.

"The Server was unable to process the request. Close the application and start again"


After the error the client crashes and I have to restart it. My code is below. I've tried instantiating on both the client and the server and I get the same error. In debug, the code executes fine until it tries to display the page it was called from. Any and all help would be appreciated.


IF ISCLEAR(WindShell) THEN
CREATE(WindShell,FALSE,ISSERVICETIER);

WindowDir := Environ1.GetEnvironmentVariable('windir');
WinType := 1;
WaitVar := FALSE;
WindshellCommand := WindowDir+'\System32' + '\notepad.exe '+ Environ1.GetEnvironmentVariable('temp') + '\' + USERIDPART + '.txt';
WindShell.Run(WindshellCommand, WinType, WaitVar);

CLEAR(WindShell);

Answers

  • Peter+is1Peter+is1 Member Posts: 174
    Hi,

    Can you find details in the eventlog?
    \\
    The truth exists in seven versions.
Sign In or Register to comment.