CobaltFusion / DebugViewPP

DebugView++, collects, views, filters your application logs, and highlights information that is important to you!
Boost Software License 1.0
978 stars 144 forks source link

Failed to run DebugViewConsole as windows service #349

Open Roman-Bober opened 5 years ago

Roman-Bober commented 5 years ago

Install windows service , define service to Log on as admin account(not localhost) Run DebugViewConsole under this service/user Result Fails with following exception " Unexpected error occurred: CreateDBWinBufferMapping Listening for OutputDebugString messages... Another DebugView++ (or similar application) might be running. " Expected: To run as normal

After debugging the code notices, that when running the DebugViewConsole as service following code executed ~\DebugViewPP\DebugViewConsole\DebugViewConsole.cpp:128 if (IsWindowsVistaOrGreater() && HasGlobalDBWinReaderRights()) logsources.AddDBWinReader(true); When running process regularly(via cmd prompt) it's not executed After comment out above if statement the issues was fixed Please help OS tried windows 7 with latest updates

janwilmans commented 5 years ago

In order for debugviewconsole to receive logging from users other then itself, it needs debug access rights.

I could fix it as you suggested and it wouldn't give an error message anymore, but then it would only log messages from the same user account that is running the service...

Does that make sense?

I'm not sure why it is not getting 'debug access rights' while you are running 'as admin'.

On Wed, Mar 13, 2019, 08:49 Roman-Bober notifications@github.com wrote:

Install windows service , define service to Log on as admin account(not localhost) Run DebugViewConsole under this service/user Result Fails with following exception " Unexpected error occurred: CreateDBWinBufferMapping Listening for OutputDebugString messages... Another DebugView++ (or similar application) might be running. " Expected: To run as normal

After debugging the code notices, that when running the DebugViewConsole as service following code executed

~\DebugViewPP\DebugViewConsole\DebugViewConsole.cpp:128 if (IsWindowsVistaOrGreater() && HasGlobalDBWinReaderRights()) logsources.AddDBWinReader(true); When running process regularly(via cmd prompt) it's not executed After comment out above if statement the issues was fixed Please help OS tried windows 7 with latest updates

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CobaltFusion/DebugViewPP/issues/349, or mute the thread https://github.com/notifications/unsubscribe-auth/AFqJhCkCKLO-fh_lvoMCOpi1yYXcvZW2ks5vWK2QgaJpZM4bsmCg .

Roman-Bober commented 5 years ago

Hi Jan, Thank you for such prompt reply actually debugviewconsole was crashing under the windows service... I think it would be sufficient to log messages only from user account that runs the windows service as a workaround

Thanks, Roman

janwilmans commented 5 years ago

Thanks for reporting and for your analysis, I will look at this once I'm back at home, I'm currently traveling.

On Fri, 15 Mar 2019 at 06:24, Roman-Bober notifications@github.com wrote:

Hi Jan, Thank you fro such prompt reply actually debugviewconsole was crashing under the windows service... I think it would be sufficient to log messages only from user account that runs the windows service as a workaround

Thanks, Roman

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CobaltFusion/DebugViewPP/issues/349#issuecomment-473163046, or mute the thread https://github.com/notifications/unsubscribe-auth/AFqJhNWHdyGV6bRDPhKaRQcNLXonT_Qpks5vWy6jgaJpZM4bsmCg .

-- Jan

YaarPatandarAA commented 3 years ago

@janwilmans Any progress of this issue?

I am also facing the same problem as @Roman-Bober while trying to run DebugViewPP Console as a windows service.