This topic is locked

Execute a ms-Dos bat file from events

8/8/2019 9:10:13 AM
ASPRunnerPro General questions
F
Frank Erik author

The goal is simple, just to run a "xxxxx.bat" or "xxxx.exe" by clicking a custom button on the list page.

Have tried several code-tips from google, but still no success.

Any tips why this code want work?
var wshShell = new ActiveXObject("WScript.Shell");

wshShell.Run("D:\\dir\\user.bat");

admin 8/11/2019

The code itself looks good but the problem is most likely with permissions. IIS runs under a limited permissions account that doesn't have permissions to run EXE or BAT files. You will have to change it to run under a SYSTEM or NETWORK SERVICE account.