I have a page file (aspx) and a (.cs file) where the user can input some rules to block or unblock lines of production. When the user finishes making any changes, he/she presses a buuton to save the data. First it makes a .txt file with all the rules that were made or changed.
After that I need to execute a .exe file (made in Python) that takes this information and makes another text file by reading all the lines of production and all the orders (2 other files) to Block productions in certains lines. This is already done.
My problem is that I can't execute this .exe file. I have tried with this code in the .cs file
ScriptManager.RegisterStartupScript(this, GetType(), "blockinglines", "BlockLine()", true);
And BlockLine function is this
<script>
function BlockLine(){
var shell = new ActiveXObject("WScript.Shell");
var bat = "\"C:\\inetpub\\wwwroot\\BlockLine\\Bin\\dist\\BLines.exe\" ";
shell.Run(bat);
}
</script>
But I can't run it. Is there any other solution to make this or an error I have made in the code??
.exefile? What isBlockLine()and what does it do? It's really not clear at all what you're trying to accomplish here or how it needs to work.BlockLine()ActiveXObject? Is there an error in the JavaScript console at all? Does that file even exist on the client machine?