【问题标题】:iexpress extract files then run vbs referencing files from within the exeiexpress 提取文件,然后从 exe 中运行 vbs 引用文件
【发布时间】:2015-03-16 08:11:23
【问题描述】:

我无法让 vbs 与 iexpress 一起工作。 我正在尝试让 exe 文件打开一个 vbs,该 vbs 打开一个在 exe 中保存的 hta。但是当我这样做时,我得到一个位于 %temp% 中的空白 hta。

我的问题是;如何让 vbs 正确定位 iexpress 的解压缩位置,以便我的脚本打开从 exe 中提取的 hta 而不是空白的 %temp% 文件?

我试过这样做:

Set objShell = CreateObject("Wscript.Shell")

strPath = Wscript.ScriptFullName
Set objFSO = CreateObject("Scripting.FileSystemObject")

Set objFile = objFSO.GetFile(strPath)
strFolder = objFSO.GetParentFolderName(objFile)

CreateObject("WScript.Shell").Run "C:\Windows\System32\mshta.exe " & 
CreateObject("WScript.Shell").CurrentDirectory &"\page.hta"

【问题讨论】:

标签: vbscript hta iexpress


【解决方案1】:

我发现这些文件在我可以访问它们之前就被简单地删除了,因为 exe 文件在 vbs 能够获取其他文件之前会自行删除。不是目录错了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-01-16
    • 1970-01-01
    • 2019-05-27
    相关资源
    最近更新 更多