I am writing this app in windows form c#. When user exit from this app , it asks for system reboot. While exiting it writes some XML file and saves the file in current directory(bin/debug)....On system restart my app restarts itself (by reading value from registry)and check if those file exist (if(File.Exists))or not..My problem is on system restart it doesn't check for file existence at all...and shows wrong output...But when I close it and restart it again it shows the right output..I really cant understand its problem...Can anybody please help me...??
Asked
Active
Viewed 96 times
0
-
I believe you should do some logging if your app didn't find a file which is required. – Sergei B. Jun 26 '12 at 20:00
1 Answers
0
The program needs to read the file from an absolute directory location and not a relative or current. Its context upon start may be different than when it was last run.

ΩmegaMan
- 29,542
- 12
- 100
- 122
-
@ShikhaShah please mark as answer so everyone knows the issue is resolved. :-) – ΩmegaMan Jun 26 '12 at 20:17