Does anyone know how to run a certain program, when SHUTTING down from WINDOWS?
Can you do it through the registry or with codes?
Thanks!
Printable View
Does anyone know how to run a certain program, when SHUTTING down from WINDOWS?
Can you do it through the registry or with codes?
Thanks!
Not sure about the registry, but if you have a program running, you can catch the form_queryunload event to find out why your program is quitting, one of the options is that windows is shutting down. Do what you want to do then :-)
Put and application to run att startup with
and it will run your file at shutdown. I'm not sure but you can not allow threading in that app or the shutdown operation will hang up until you get an End task window. You could of course cancel the operation and restart it laterCode:Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = vbAppWindows Then
Shell "C:\yourapppath\yourapp.exe", vbNormalFocus
End If
End Sub
I think that is what I am looking for Kedaman.
Thanks Kedaman!
Yep, that is what I was looking for Kedaman. Thanks.