该文件正由另一个应用程序使用

编程入门 行业动态 更新时间:2024-10-10 14:22:08
本文介绍了该文件正由另一个应用程序使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

您好。 我想从运行一个外部应用程序,所以我写了它。

Hi. I wanted to run an external application from so i wrote it .

Dim p As System.Diagnostics.Process = System.Diagnostics.Process.Start(Address) Thread.Sleep(55000) If p.HasExited = False Then p.Kill() End If

并且它实际上运作良好。但是当电力消失时,我的服务器将不会停止应用程序的实例 并且在启动之后服务器想要运行应用程序但是在这里它给了我错误。 该文件正由另一个应用程序使用 我试图用此代码关闭文件

and it worked well actually. But when the electricity goes off my server will not stop the instance of the application and after starting up the server wants to run the application but here it gives me th error . "the file Is being Used by another application" I tried to close the file with this code

If File.Exists(Address) Then File .Delete( AddressFile) End If

但它再次给了我同样的错误 我该怎么办?

but it again gives me the same error what should i do ?

推荐答案

Mate结束处理任务管理器中的文件。然后重新启动程序 Mate end process the file in the task manager. Then restart your program

更多推荐

该文件正由另一个应用程序使用

本文发布于:2023-11-09 23:39:42,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1573761.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:该文件   应用程序

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!