Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restart an application

Status
Not open for further replies.

aTekTipsUser

Programmer
Nov 8, 2004
68
US
I have a process where I have an application on a network drive that everyone shares. I subscribe to the RenamedEventHandler for when the file is renamed. When the file is renamed, the application should restart and use the updated file. When I test it myself, it works fine. When the live users get the notification of an update, the application restarts, but it starts the old application. Ex. If app1.exe is the old file, and I rename it to app1_OLD.exe and place the new app1.exe in the same folder, the application.restart starts app1_OLD.exe. I have also tried using Process.Start(Application.StartupPath & "\\app1.exe"), but app1_OLD.exe is still started. How can I start the updated version? Thanks for the help!
 
Process.Start(Application.StartupPath & "\\app1.exe")

Look into this option a little deeper.

Application.Restart() is not the way to go.
If this is for deployment purposes, I may suggest an updater application as opposed to having your regular app do it.

You may also want to look into some of the quick deployment software packages (OneClick, etc)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top