【问题标题】:WScript.Shell CurrentDirectory returning the location of the calling app not current locationWScript.Shell CurrentDirectory 返回调用应用程序的位置而不是当前位置
【发布时间】:2011-12-08 18:04:10
【问题描述】:

我有两个应用程序。第一个叫第二个。第二个需要知道它在本地机器上的位置。但是CurrentDirectory 指令会返回第一个应用程序的位置。

var objShell = new ActiveXObject("WScript.Shell");
var dirScript = objShell.CurrentDirectory;

如何获取第二个应用程序的真实位置?

【问题讨论】:

    标签: javascript vbscript activex hta wsh


    【解决方案1】:

    由于第一个应用程序知道第二个应用程序在哪里,它应该能够将该值作为参数传递。

    【讨论】:

      猜你喜欢
      • 2015-04-13
      • 1970-01-01
      • 2015-05-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-02-05
      相关资源
      最近更新 更多