Thank you very much for this precision, this is crucial.
I will modify the program to use the
GETENV("SystemRoot")+"\System32\CONFIG.NT"
and add plenty of tests to get a much more precise message to the user if something goes wrong.
Thanks a lot.
>No, it'll be located in GETENV(SystemRoot) + "\System32", for example C:\WINDOWS\SYSTEM32\CONFIG.NT. You cannot assume that SystemRoot'll be always C:\Windows because it can be changed during Windows installation or as result of upgrading to WinXP.
>
>>Hi Sergey,
>>
>>Thanks for this one.
>>
>>Does that mean that CONFIG.NT would then be located directly
>>in C:\WINDOWS\CONFIG.NT ?
>>
>>But if in some case the user is not allowed to change this file, my program will not be allowed to change anything too. Right?
>>I hope FOPEN can detect this situation correctly.
>>
>>Thanks again.
>>