无法从.Net执行EXE [英] Cannot execute EXE from .Net
问题描述
这是我的代码;
Dim psi As New System.Diagnostics.ProcessStartInfo
psi.UseShellExecute = True
psi.FileName =" C:\ WinProg.exe"
System.Diagnostics.Process.Start(psi)
测试了WinProg.exe和但是,当从.Net调用时,EXE不会执行。
任何帮助都会受到赞赏。
Here is my code;
Dim psi As New System.Diagnostics.ProcessStartInfo
psi.UseShellExecute = True
psi.FileName = "C:\WinProg.exe"
System.Diagnostics.Process.Start(psi)
Have tested WinProg.exe and works., However, when called from .Net, EXE doesn''t execute.
Any help would be appreciated.
推荐答案
*" =?Utf-8?B?Sm9obiBGLg ==?=" < John F. @ discuss.microsoft.com> scripsit:
* "=?Utf-8?B?Sm9obiBGLg==?=" <John F.@discussions.microsoft.com> scripsit:
Dim psi As New System.Diagnostics.ProcessStartInfo
psi.UseShellExecute = True
psi.FileName =" C:\ WinProg.exe"
System.Diagnostics.Process.Start(psi)
测试了WinProg.exe并且工作。但是,当从.Net调用时,EXE不会执行。
Dim psi As New System.Diagnostics.ProcessStartInfo
psi.UseShellExecute = True
psi.FileName = "C:\WinProg.exe"
System.Diagnostics.Process.Start(psi)
Have tested WinProg.exe and works., However, when called from .Net, EXE doesn''t execute.
尝试''System.Diagnostics.Process.Start(" C:\ WinProg.exe")''。如果这个
不起作用,试试''Shell(...,...)''。
-
Herfried K. Wagner [MVP]
< URL:http://dotnet.mvps.org/>
Try ''System.Diagnostics.Process.Start("C:\WinProg.exe" )''. If this
doesn''t work, try ''Shell(..., ...)''.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
导入System.Diagnostics
将NewProcess视为进程=新进程
NewProcess.Start(" C:\ MyApplication.exe")
问候
M. posseth [MCP]
" Herfried K. Wagner [ MVP] QUOT; <喜*************** @ gmx.at>在消息中写道
news:2j ************* @ uni-berlin.de ...
Imports System.Diagnostics
Dim NewProcess as Process = new Process
NewProcess.Start("C:\MyApplication.exe")
regards
M. posseth [MCP]
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2j*************@uni-berlin.de...
*" =?Utf ????-8乙Sm9obiBGLg == = QUOT; < John F. @ discuss.microsoft.com> scripsit:
* "=?Utf-8?B?Sm9obiBGLg==?=" <John F.@discussions.microsoft.com> scripsit:
Dim psi As New System.Diagnostics.ProcessStartInfo
psi.UseShellExecute = True
psi.FileName =" C:\ WinProg.exe"
System.Diagnostics.Process.Start(psi)
测试过WinProg.exe并且有效。但是,当从.Net调用时,EXE
Dim psi As New System.Diagnostics.ProcessStartInfo
psi.UseShellExecute = True
psi.FileName = "C:\WinProg.exe"
System.Diagnostics.Process.Start(psi)
Have tested WinProg.exe and works., However, when called from .Net, EXE
不会执行。
尝试''System.Diagnostics.Process.Start(" C:\ WinProg.exe")''。如果这不起作用,请尝试''壳牌(......,......)''。
-
Herfried K. Wagner [MVP]
< URL:http://dotnet.mvps.org/>
doesn''t execute.
Try ''System.Diagnostics.Process.Start("C:\WinProg.exe" )''. If this
doesn''t work, try ''Shell(..., ...)''.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
*" M. Posseth" < MI ***** @ nohausystems.nl> scripsit:
* "M. Posseth" <mi*****@nohausystems.nl> scripsit:
Imports System.Diagnostics
Dim NewProcess as Process = new Process
NewProcess.Start(" C:\ MyApplication.exe" ;)
Imports System.Diagnostics
Dim NewProcess as Process = new Process
NewProcess.Start("C:\MyApplication.exe")
不! ''开始''是''进程''的一个/共享/方法,它将/返回/一个
''进程''对象。
-
Herfried K. Wagner [MVP]
< URL:http://dotnet.mvps.org/>
No! ''Start'' is a /shared/ method of ''Process'' that will /return/ a
''Process'' object.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
这篇关于无法从.Net执行EXE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!