Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb.net 如何在特殊目录中打开外部应用程序_Vb.net - Fatal编程技术网

Vb.net 如何在特殊目录中打开外部应用程序

Vb.net 如何在特殊目录中打开外部应用程序,vb.net,Vb.net,我目前正在寻找一种打开位于userprofile文件夹中的外部应用程序的方法。这是我当前的代码: Dim p As New ProcessStartInfo 'program function' p.FileName = "%userprofile%/folder/app.exe" Process.Start(p) 我到目前为止运气不好。如果有人知道怎么做,那就太好了试试看 p.FileName = Environment.ExpandEnvironmentV

我目前正在寻找一种打开位于userprofile文件夹中的外部应用程序的方法。这是我当前的代码:

    Dim p As New ProcessStartInfo

    'program function'
    p.FileName = "%userprofile%/folder/app.exe"
    Process.Start(p)
我到目前为止运气不好。如果有人知道怎么做,那就太好了

试试看

p.FileName = Environment.ExpandEnvironmentVariables("%userprofile%/folder/app.exe")

使用
Environment.ExpandEnvironmentVariables()
展开
%userprofile%
;请看这是C#我目前正在vb.net中寻找一种方法