Git Product home page Git Product logo

rdp-battmon's People

Contributors

alostengineer avatar transistor1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

rdp-battmon's Issues

Exception occurs when client computer falls asleep (hibernates?)

When computer is closed & hibernates, exception occurs

2018-03-10 14:51:34,420 [8] FATAL FieldEffect.Program [(null)] - FieldEffect.VCL.Exceptions.VirtualChannelException: TsClientAddIn (BATTMON): Couldn't write to communcation channel for battery monitor.
   at FieldEffect.VCL.Client.RdpClientVirtualChannel.VirtualChannelWrite(Byte[] data) in C:\Users\russosv\Documents\Visual Studio 2017\Projects\RDP Laptop Battery Monitor\RDP Virtual Channel Library\Client\RdpClientVirtualChannel.cs:line 60
   at FieldEffect.Models.BatteryDataReporter._clientAddIn_DataChannelEvent(Object sender, DataChannelEventArgs e) in C:\Users\russosv\Documents\Visual Studio 2017\Projects\RDP Laptop Battery Monitor\Client MSTSC Add-in\Models\BatteryDataReporter.cs:line 87
   at FieldEffect.VCL.Client.RdpClientVirtualChannel.OnDataChannelEvent(DataChannelEventArgs e) in C:\Users\russosv\Documents\Visual Studio 2017\Projects\RDP Laptop Battery Monitor\RDP Virtual Channel Library\Client\RdpClientVirtualChannel.cs:line 100
   at FieldEffect.VCL.Client.RdpClientVirtualChannel.VirtualChannelOpenEvent(Int32 openHandle, ChannelEvents Event, Byte[] data, Int32 dataLength, UInt32 totalLength, ChannelFlags dataFlags) in C:\Users\russosv\Documents\Visual Studio 2017\Projects\RDP Laptop Battery Monitor\RDP Virtual Channel Library\Client\RdpClientVirtualChannel.cs:line 117

Prebuilt binaries for Windows RT

Hi,

I don't wanna sound ungrateful for your project, but I really don't know how to do this, and want to use a Surface RT as a RDP client. It's in test mode and I can sign apps with my own key.

Could you provide me with a build for ARM architecture used on Surface RT? (Windows RT 8.1).

Thank you very much.

Tray App: Parameter is not valid.

App had been running for several days without issue. Logged in today and the app was displaying the X icon, indicating there was no battery data.

Stack trace:

   at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
   at System.Drawing.Icon.BmpFrame()
   at System.Windows.Forms.ThreadExceptionDialog..ctor(Exception t)
   at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)
   at System.Windows.Forms.Control.WndProcException(Exception e)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Even though we don't have the file name/line number, this has to be occurring in the BatteryIcon.cs file, because that's the only place we're dealing with bitmaps.

"HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\" Registry Entry Not On My Client Machine

Hi @transistor1

Cool application! I am having an issue installing it properly though. The registry path "HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client" wasn't on my client machine, so I went ahead and created it and added the path to the client dll at "HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default\AddIns\BattMon".

When I go to run the server application on the RDP server it cannot find the client battery. I am assuming it is because "HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client" isn't properly configured on my machine. How would I go about properly installing that so I am able to use RDP add-ins?

Make server logging work the same way as client logging

I think it would be good if both client & server log configuration worked exactly the same way. I think it might be better to use the log4net.config file — rather than an exe.config file — on both sides, because DLLs aren't really supposed to support .config files. More ideally, logging should be configured by an MSTSC.exe.config, but that’s not likely to be feasible, since (a) many users won’t have access to create a config file alongside a system executable, and (b) I’m not sure if you can write a .NET config file for an unmanaged executable.

Also, maybe change log4net.config to BattMon_Log.config for more clarity, and to avoid potential naming conflicts, if there are other files in the same folder?

Write a client-side installer

To avoid confusion with installation we need to write an installer for the client application.

Installer should be able to be used by non-admins (that is, it should not raise the UAC prompt). This is doable in WiX installer, though other suggestions welcome.

Compiling

Greetings! I'm the superuser question creator.

How should I go about compiling this? Do I need VS?

Crash in Win32BatteryManagementObjectSearcher::GetAllBatteries()

Crash Reported in #8

- <System>
  <Provider Name="Windows Error Reporting" /> 
  <EventID Qualifiers="0">1001</EventID> 
  <Level>4</Level> 
  <Task>0</Task> 
  <Keywords>0x80000000000000</Keywords> 
  <TimeCreated SystemTime="2018-03-06T03:38:22.594850200Z" /> 
  <EventRecordID>30242</EventRecordID> 
  <Channel>Application</Channel> 
  <Computer>Lappy2010</Computer> 
  <Security /> 
  </System>
- <EventData>
  <Data>1833787917323518067</Data> 
  <Data>5</Data> 
  <Data>CLR20r3</Data> 
  <Data>Not available</Data> 
  <Data>0</Data> 
  <Data>mstsc.exe</Data> 
  <Data>10.0.16299.15</Data> 
  <Data>3a40081f</Data> 
  <Data>RDS_Client_Addin_BattMon</Data> 
  <Data>1.0.1.0</Data> 
  <Data>5a9e0ad3</Data> 
  <Data>2b</Data> 
  <Data>68</Data> 
  <Data>System.NullReferenceException</Data> 
  <Data /> 
  <Data>\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER2B8A.tmp.mdmp \\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER34A4.tmp.WERInternalMetadata.xml \\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER34B1.tmp.csv \\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER34F1.tmp.txt \\?\C:\Users\Peter Berbec\AppData\Local\Temp\WER4280.tmp.appcompat.txt \\?\C:\Users\Peter Berbec\AppData\Local\Temp\WER42A0.tmp.WERDataCollectionStatus.txt</Data> 
  <Data>C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_mstsc.exe_3edcc19b72aba3b85e9781e9c4bda1e80e62e59_2d2465bf_15dc42da</Data> 
  <Data /> 
  <Data>0</Data> 
  <Data>ffe79c66-7891-4e97-a06e-aa69ea2fc2f9</Data> 
  <Data>2147487752</Data> 
  <Data>9792ade44c9760f5f972ec651d78c073</Data> 
  </EventData>
  </Event>

- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
  <Provider Name="Application Error" /> 
  <EventID Qualifiers="0">1000</EventID> 
  <Level>2</Level> 
  <Task>100</Task> 
  <Keywords>0x80000000000000</Keywords> 
  <TimeCreated SystemTime="2018-03-06T03:38:16.126011400Z" /> 
  <EventRecordID>30241</EventRecordID> 
  <Channel>Application</Channel> 
  <Computer>Lappy2010</Computer> 
  <Security /> 
  </System>
- <EventData>
  <Data>mstsc.exe</Data> 
  <Data>10.0.16299.15</Data> 
  <Data>3a40081f</Data> 
  <Data>unknown</Data> 
  <Data>0.0.0.0</Data> 
  <Data>00000000</Data> 
  <Data>c0000005</Data> 
  <Data>00007ffb0c14bff9</Data> 
  <Data>e0c</Data> 
  <Data>01d3b4fc844c4599</Data> 
  <Data>C:\Windows\system32\mstsc.exe</Data> 
  <Data>unknown</Data> 
  <Data>ffe79c66-7891-4e97-a06e-aa69ea2fc2f9</Data> 
  <Data /> 
  <Data /> 
  </EventData>
  </Event>


- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
  <Provider Name=".NET Runtime" /> 
  <EventID Qualifiers="0">1026</EventID> 
  <Level>2</Level> 
  <Task>0</Task> 
  <Keywords>0x80000000000000</Keywords> 
  <TimeCreated SystemTime="2018-03-06T03:38:14.704141900Z" /> 
  <EventRecordID>30240</EventRecordID> 
  <Channel>Application</Channel> 
  <Computer>Lappy2010</Computer> 
  <Security /> 
  </System>
- <EventData>
  <Data>Application: mstsc.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.NullReferenceException at FieldEffect.Classes.Win32BatteryManagementObjectSearcher.GetAllBatteries() at FieldEffect.Models.BatteryDataReporter._clientAddIn_DataChannelEvent(System.Object, FieldEffect.VCL.Client.DataChannelEventArgs) at FieldEffect.VCL.Client.RdpClientVirtualChannel.OnDataChannelEvent(FieldEffect.VCL.Client.DataChannelEventArgs) at FieldEffect.VCL.Client.RdpClientVirtualChannel.VirtualChannelOpenEvent(Int32, FieldEffect.VCL.Client.WtsApi32.ChannelEvents, Byte[], Int32, UInt32, FieldEffect.VCL.Client.WtsApi32.ChannelFlags)</Data> 
  </EventData>
  </Event>

Idea: automatically copy and execute the server-side battery display

There's a tab in Advanced settings called "Programs" that allows you to start a program on the remote machine when your connection starts. Therefore it may be possible to do this programmatically in the client side add-in.

Also, RDP has the ability to upload files. If I do ctrl-C on a file on the client side, and ctrl-V in the server window, it will copy the file from client to server.

If it is possible to do both of these programmatically, it might be possible to copy the server side EXE to a temp folder upon connection, and start it automatically. Then the battery reporting would happen automatically as long as the client add-in is installed, so it'd show up on whatever host you connect to. That'd be cool.

Logging doesn't work

Client add-in should be logging to the Event Viewer's application log, but it's not. Log4Net misconfiguration.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.