Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / October 2004

Tip: Looking for answers? Try searching our database.

Replacing the file from which the code is executed

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
hoenes1 - 20 Oct 2004 09:57 GMT
Hi all,

how can I replace the file I'm executing at the moment? I want Windows
to end the process, perform the copy/update action and then restart
the new file. Are there any handy mechanisms?

Thanks in advance.
Jochen Kalmbach - 20 Oct 2004 10:14 GMT
Hi hoenes1,

> how can I replace the file I'm executing at the moment? I want Windows
> to end the process, perform the copy/update action and then restart
> the new file. Are there any handy mechanisms?

- start a second app
- terminate your app
- replace the exe in your second app
- start the app again
- terminate second app

Signature

Greetings
 Jochen

  My blog about Win32 and .NET
  http://blog.kalmbachnet.de/

Jochen Kalmbach - 20 Oct 2004 10:16 GMT
Hi hoenes1,

> how can I replace the file I'm executing at the moment? I want Windows
> to end the process, perform the copy/update action and then restart
> the new file. Are there any handy mechanisms?

An other solution is to rename your EXE (this is possible) and then write
the new exe and start the exe and terminate.
Signature

Greetings
 Jochen

  My blog about Win32 and .NET
  http://blog.kalmbachnet.de/

hoenes1 - 21 Oct 2004 11:46 GMT
> Hi hoenes1,
>
[quoted text clipped - 4 lines]
> An other solution is to rename your EXE (this is possible) and then write
> the new exe and start the exe and terminate.

Jochen,

thank you for your proposals. These were the techniques I would think
of, too. I thought there could be a special Windows way, but your
proposals are ok for me. Thanks again.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.