PDA

View Full Version : Cannot open file (R.O.) in a QtService



Jarvis
27th May 2012, 13:15
I have built a simple Qt service. It works fine on Windows XP but fails on Windows 7 x64 and Windows Server 2008 R2 x64. (I guess it should fail with any Windows version >= 6.0.)

The system cannot find the path specified. C:/Windows/system32/ssl/client-key.pem

Of course, this file exists. I am opening it in "read only" mode.

Does anyone have any idea ?

Many thanks in advance.

Talei
27th May 2012, 13:30
IMHO your service should have administrative permissions to access file in system32 tree.

Jarvis
27th May 2012, 14:29
That is what I expected.

System (user), Administrators (group), and Users (group) are allowed to access the folder and its files, at least for reading.
I tried to install and start the service as Local System (default), Local Service, Network Service, Administrator, adjusting folder/files permissions accordingly but the same failure occurs.

Running service (with "-e" parameter) works with no problem.