Background
I have a C# windows Form application that sets its default top and left value based on the top and left value of the previous instance of the app opened.
For example, app A opens at left=50 and top=15. User drags the application window to the right so that the app's left=500 and top=50. User exits the application and reopens the application. Its current position is at the position it was last closed (left=500 and top=50).
Problem
I want to reset the value to left=50 and top=15 after I have restarted the Windows OS. Googling only came out with resetting the values after application quits but what I want is resetting the values after Windows OS restart.
The only way I can think of currently is creating a task in task scheduler that runs a batch script file to adjust the values in .config
file of the app after windows restart but doing it this way would require one to maintain an extra script file and create a task (more work).