Is there possible to run CFile::Open in order to write a text file, inside C:\Program Files\ location, with administrator rights, even the application who call this are not started with administrator rights ?

But I suggest to rethink your request. An application should not modify data in the Program Files directory tree. That should be only modified by installation and update processes. Windows provides common directories for application specific data (shared and per user).

But in the last few days, an automatic upgrade came: it shows a MessageBox that says "One-way upgrade. Visual Studio will automatically make functional changes to the following projects in order to open them. ...".

With one of my projects (called 'dragclip_vc'), today, however often I open it and look in it and close it, the new upgrade system shows and needs attention, every time I open that project, and it does not preserve the display of opened files. Please how can I stop that from happening? (I know that the automatic upgrade needs doing once for each of my projects.)

(Another of my projects (called 'makeobj_vc') auto-upgraded correctly and did not ask again for upgrading, and it preserves the display of opened files.)

dragclip_vc is a very small project; all that it does is that if I drag a file into it from a directory display, it puts that file's full pathname in the Windows clipboard. It is useful.

makeobj_vc is a big project.

The '_vc' on the ends of their names means "for Visual C++"; it is to distinguish from old versions that I had written for Borland C.

This is not that unusual. The upgrade system in Visual Studio can have problems for a variety of reasons. Your best bet is just to create a new project, and then copy the source files into the new project location and add them manually to the project.

But in the last few days, an automatic upgrade came: it shows a MessageBox that says "One-way upgrade. Visual Studio will automatically make functional changes to the following projects in order to open them

What VS version are you using?
In what version is it about to upgrade?

When I opened its help just now, a top panel said "We recommend using Visual Studio 2017 / Download now"; but will that cause a quick replacement of my VS 2015 by VS 2017, or will there be a long complicated process?

When I opened its help just now, a top panel said "We recommend using Visual Studio 2017 / Download now"; but will that cause a quick replacement of my VS 2015 by VS 2017, or will there be a long complicated process?

I used my desktop "Visual C 2015 devenv.exe" icon to access my VS 2015, and I tried to access several of my projects. All but one of them that I tried came up and recompiled successfully, and there was no "One-way upgrade. Visual Studio ..." nuisance.

The only project that caused trouble was dragclip_vc, which kept on showing the "One-way upgrade. Visual Studio will automatically make functional changes to the following projects in order to open them. ...". MessageBox. So I remade this project as a new VS 2015 project dragclip2 using copies of dragclip_vc's source files, and this new project behaves OK. I suspect that the "One-way upgrade. Visual Studio ..." nuisance persisted because dragclip is such a small project that it does not have some feature that "One-way upgrade. Visual Studio ..." looks for to see if it has already been called on that project.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Next step for me, I suppose, is to find how to run VS 2017. It looks very different from VS 2015.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I keep pointers to all my Visual C++ projects in a folder called C:\Visual_C\Visual_C_pointers\