DebugViewPP icon indicating copy to clipboard operation
DebugViewPP copied to clipboard

Failed to run DebugViewConsole as windows service

Open Roman-Bober opened this issue 5 years ago • 4 comments

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

Roman-Bober avatar Mar 13 '19 07:03 Roman-Bober

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 [email protected] 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 .

janwilmans avatar Mar 13 '19 08:03 janwilmans

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

Roman-Bober avatar Mar 15 '19 05:03 Roman-Bober

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 [email protected] 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

janwilmans avatar Mar 16 '19 06:03 janwilmans

@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.

YaarPatandarAA avatar Aug 06 '20 18:08 YaarPatandarAA