从Javascript执行rundll32.exe [英] executing rundll32.exe from Javascript
问题描述
大家好,
请告诉我通过Javascript(在C#中)执行以下代码的正确语法
函数RunClickOnceApplication(Word)
{
var WshShell = new ActiveXObject(WScript.Shell);
WshShell.Run(''rundll32.exe WWEB32.DLL,ShowRunDLL''+ Word)
}
用Javascript调用此函数.但是我的问题是,即使dll存在于我的系统中,它也没有执行dll.
预先谢谢您.
Hi All,
Please tell me the correct syntax for excuting below code through Javascript (in C#)
function RunClickOnceApplication(Word)
{
var WshShell = new ActiveXObject(WScript.Shell);
WshShell.Run(''rundll32.exe WWEB32.DLL,ShowRunDLL ''+Word)
}
Calling this function in Javascript.But my problem is that it is not executing the dll, even though the dll exists on my system.
Thanking you in advance.
推荐答案
尝试:
function RunClickOnceApplication(Word)
{
var WshShell = new ActiveXObject("WScript.Shell");
WshShell.Run('rundll32.exe WWEB32.DLL,ShowRunDLL '+Word)
}
缺少用于创建ActiveX对象的双引号.
Double quotes for creating ActiveX object was missing.
这篇关于从Javascript执行rundll32.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!