i have had the hardest time finding any specific solutions for this...so I guess this is more of a tip but I wonder if anybody has a better way of doing it.......I apologize if this is common knowledge to some but it works great for me and i'm excited...!!!
I have an .ADE file that i want to copy from the network to a user's hard drive and then execute(open)_ every time they want to start the program.
if for some reason the file is open, and say minimized, if they were to try this, since opened files as such are blocked from deleting when opened, here's what i found will trap a System IO Excepetion error:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
FileCopy("c:\test\net\test.ade", "c:\test\local\test.ade")
System.Diagnostics.Process.Start("c:\test\local\test.ade")
Catch ex As IOException
MsgBox("File is already open.")
Close()
Finally
Close()
End Try
End Sub
End Class
---------I just run this as a small blank form, create the shortcut for the user and they're good to go.
any easier or safer way?
I have an .ADE file that i want to copy from the network to a user's hard drive and then execute(open)_ every time they want to start the program.
if for some reason the file is open, and say minimized, if they were to try this, since opened files as such are blocked from deleting when opened, here's what i found will trap a System IO Excepetion error:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
FileCopy("c:\test\net\test.ade", "c:\test\local\test.ade")
System.Diagnostics.Process.Start("c:\test\local\test.ade")
Catch ex As IOException
MsgBox("File is already open.")
Close()
Finally
Close()
End Try
End Sub
End Class
---------I just run this as a small blank form, create the shortcut for the user and they're good to go.
any easier or safer way?