我需要打开外部exe文件,同时传递一些参数给它。
Xojo库中的文档建议使用Shell,但我还没有看到如何使用的实际示例。
Xojo Shell命令解释:
Dim sh As New Shell
sh.Execute("Location to a file")我尝试过以下几种方法:
sh.Execute("Location to a file" + " " + myArgumentOne + " " + myArgumentTwo)没有错误,只是*.exe没有运行。
如果有使用FolderItem的解决方案,我也会很乐意使用它。
发布于 2015-09-16 19:45:39
您可能不需要使用shell。当您有了folderitem之后,使用Launch执行程序并传递参数。例如
dim f as folderitem = GetFolderItem("C:\myprogram.exe", Folderitem.PathTypeShell)
f.Launch("Parameter1, Parameter2")请参阅http://docs.xojo.com/index.php/FolderItem.Launch
发布于 2015-02-06 18:35:16
sh.Execute F.ShellPath +"\program.exe " + parametersF是一个指向程序目录的Folderitm,参数是一个字符串
https://stackoverflow.com/questions/25796062
复制相似问题