如何在不通过目录路径的情况下打开硬盘中可用的exe文件 [英] How to open an exe file available in hard disk without go through the directory path

查看:111
本文介绍了如何在不通过目录路径的情况下打开硬盘中可用的exe文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在C盘中打开文件名SymCorpUI.exe,但无法直接执行exe文件而不通过整个目录路径



我尝试过:



我使用代码

Process.Start(My.Computer.FileSystem.CurrentDirectory& ;\ SymCorpUI.exe)



但它显示找不到文件

I want to open the file name SymCorpUI.exe available in C drive but unable to execute the exe file directly without going through the whole directory path

What I have tried:

I use the code
Process.Start(My.Computer.FileSystem.CurrentDirectory & "\SymCorpUI.exe")

but it shows file not found

推荐答案

开始于查看您要打开的确切文件路径。

Start by looking at exactly what file path you are trying to open.
Dim path as String = My.Computer.FileSystem.CurrentDirectory & "\SymCorpUI.exe"
Process.Start(path);

在Process.Start行上放置一个断点,然后在调试器中运行你的应用程序。当它命中时,查看路径的内容。

它应该是可执行文件的完整路径,因此请检查该文件夹是否包含该文件。如果没有,则需要指定其他文件夹...

Put a breakpoint on the Process.Start line, and run your app in the debugger. When it hits, look at the content of path.
It should be the full path to the executable, so check that folder holds the file. If it doesn't, then you need to specify a different folder ...


这篇关于如何在不通过目录路径的情况下打开硬盘中可用的exe文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆