Process.Start错误'不是有效的Win32应用程序' [英] Process.Start error 'Not a valid Win32 application'

查看:161
本文介绍了Process.Start错误'不是有效的Win32应用程序'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在我的程序中创建一个粗略的自动更新工具,在下载完成后,我使用以下行运行程序。



流程。启动(filename.exe);



然后我得到异常错误'不是有效的Win32应用程序'。该程序运行一次,但可执行文件永远不会再运行。



这种情况​​发生在我尝试从我的应用程序运行的任何可执行文件中。



我必须安装程序才能让它再次运行。

I am creating a crude auto update facility in my program and after the download has completed I run the program using the following line.

Process.Start(filename.exe);

I then get the exception error 'Not a valid Win32 application'. The program runs once but then the executable never runs again.

This happens to any executable file that I try to run from my application.

I have to install the program to get it to work again.

推荐答案

我似乎是你下载的可执行程序并试图运行已损坏。您使用什么代码下载和编写.EXE文件?
I would seem that the executable your downloading and trying to run is corrupted. What code did you use to download and write the .EXE file?


我在C#中编写了可执行文件,但我也尝试使用'Process.Start()'方法运行其他程序。



我试图从它运行Notepad ++。exe并提出相同的错误,然后记事本再次运行,直到我再次安装它。



很奇怪。我只想运行自己的外部程序。
I wrote the executable in C# but I have also tried to run other programs using the 'Process.Start()' method.

I tried to run Notepad++.exe from it and brought up the same error and then Notepad would not run again until I installed it again.

Very strange. I only want to run an external program from my own.


这篇关于Process.Start错误'不是有效的Win32应用程序'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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