【发布时间】:2015-10-28 12:14:01
【问题描述】:
我正在尝试使用 COM 类打开 MyComputer ...您能帮我解决 COM 类中 MyComputer 的名称吗? 例如,如果你想打开记事本,你可以这样做:
<?php
$shell = new COM("WScript.Shell");
$shell->Run("notepad.exe");
$shell = null; ?>
运行("notepad.exe");适用于记事本,但是当我使用 Run("mycomputer.exe"); 我遇到错误:
致命错误:E:\Localhost\root\test.php 中带有消息“来源:未知
描述:未知”的未捕获异常“com_exception”: 3 堆栈跟踪:#0 E:\Localhost\root\test.php(3): com->Run('computer.exe') #1 {main} 在 E:\Localhost\root\test.php 中抛出在线3
感谢您的帮助,亲爱的朋友
【问题讨论】:
-
我的电脑不是程序,因此您需要寻找 Explorer.exe(Windows 文件浏览器)
-
tnx 伙计,它有效......但它打开了库!我想打开列出驱动器的 MyComputer 的主要部分。
-
不确定是否可以传入参数,但这可能会对您有所帮助support.microsoft.com/en-us/kb/314853