From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
|
当我在CVI中使用LaunchExecutableEx, LaunchExecutable, 或 System Functions 来打开一个文件时,发生错误。我尝试通过使用完整路径 "C:\Windows\Desktop\data.txt"来打开一个文本文件。我可以通过开始》运行选项来打开同样的文件,或者在windows系统中双击就可以。
windows系统运行某种类型的文件通过特定的应用程序打开,所以在双击该文件时,可以自动用指定的应用程序打开。比如说,文本文件可以与Word或者是IE关联。然而,CVI不能使用这个特性来建立应用。
CVI中的LaunchExecutableEx, LaunchExecutable, 或 System Functions 使用对象只能是可执行文件(.exe),批处理文件(.bat)或者是命令文件(.com)。然而如果你先打开一个特定的程序,该文件就可以从外部打开。比如要打开存放在C盘根目录下一个叫data.txt的文件,使用以下命令:
C:\{notepad.exe完整路径}\Notepad.exe c:\data.txt
确保在LaunchExecutableEx, LaunchExecutable, 或 System Functions 中使用完整路径来指向任何文件。
|