Hi
I want to make a utility which should run before computer shutdown(automatically) and copies some of the specified folders to
a back up machine.
pls. Advise.
rgds.
Avnish
Printable View
Hi
I want to make a utility which should run before computer shutdown(automatically) and copies some of the specified folders to
a back up machine.
pls. Advise.
rgds.
Avnish
there's nothing in VB that catches shutdown --- maybe there's something in the API --- check out the API documentation
You would have to experiment with this, but theoretically it sounds like it might work.
Write a VB program that sits in the System Tray and starts when the machine starts. When Windows shuts down (Normal shutdown - if someone hits the power button or the machine crashes, you are screwed) it will close running programs. You could place code in the Query_Unload event of your VB program that does your folder copy.Try it and let us know. :)VB Code:
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) If UnloadMode = vbAppWindows Then 'windows is shutting down 'your folder copy code goes here End If End Sub