wcolognese / open-hardware-monitor

Automatically exported from code.google.com/p/open-hardware-monitor
0 stars 1 forks source link

Utility Designed with OHM DLL Library will not collect data as Scheduled Task or Windows Service #341

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What is the expected output? What do you see instead?

   All output is written to an SQL 2005 database. 

What version of the product are you using? On what operating system?

   4.0

Please provide any additional information below.

   The current status if the GPU data collection project is – The utility I designed using the OHM library and implemented as a stand-alone executable works perfectly when it is manually executed by double clicking it.  In this scenario, it collects all data perfectly as expected.  However, when attempting to launch the executable in any other way (e.g. from a scheduled task, etc.), it collects all the expected information EXCEPT the all important GPU data.  Therefore, I decided to try and implement the exact same code as a Windows Service.  

With the code executing as a Windows Service, running with a User logon 
(domain) account that is a member of the local Administrators group, it can see 
the GPU hardware component (e.g. “GpuAti” on my workstation), but it cannot 
enumerate any of the sensors.  In fact, I even tried modifying the service such 
that it launched the stand-alone executable mentioned above, but that produced 
the same results.  

Does anyone have any idea why this is the case?  It definitely sounds like a 
permissions problem, but how to resolve it seems elusive. And now for the hard 
part... I cannot add the user account to the "Logon as a service" user rights 
because the controls are locked by a GPO on the domain. 

Please attach a Report created with "File / Save Report...".

   N/A 

Original issue reported on code.google.com by opus.gui...@gmail.com on 13 Apr 2012 at 11:38

GoogleCodeExporter commented 9 years ago
The problem you see is most likely the "Session 0 isolation" of Windows
Services on Windows Vista / 7. Some of the problem (and potential solutions) 
has been discussed in Issue 33 or links given there. 

If you launch the utility in a Session above 0 using a scheduled task "on logon 
of any user" then it should work. That's what the "Run On Windows Startup" 
feature of the Open Hardware Monitor GUI is doing. The implementation details 
can be found in the source.

Original comment by moel.mich on 13 Apr 2012 at 12:43