This is a Remote Desktop Add-in (for MSTSC.exe), that will allow you to report your laptop/tablet/device battery life to the terminal server.
If you like to work full screen on a remote desktop connection, but you work from a laptop or other battery powered device, you won't have to exit full screen every time you want to check your battery life.
Please check the Releases page for binary files, or build from source using Visual Studio 2017.
In the future, I plan to make installation easier for less technical users. For the time being, you need to install the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default\AddIns\BattMon
Note regedit.exe
must be run as a standard user, not as an administrator, or mstsc will not detect the key when it is run as a standard user.
Then, add a string value to the BattMon
Key:
"Name"="C:\\path\\to\\your\\folder\\RDS_Client_Addin_BattMon.dll"
Alternatively, you can create a Windows registry file:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default\AddIns\BattMon]
"Name"="C:\\path\\to\\your\\folder\\RDS_Client_Addin_BattMon.dll"
You need to run the RDS_Server_TrayApp_BattMon.exe
application on the Remote Desktop side. When it's running, you should see a battery icon on your Remote Desktop's taskbar:
By default, logs are stored in %APPDATA%\BattMon\Log.txt
, but they need to be enabled before starting.
The client won't begin logging until there is a file called log4net.config
in the same folder as your client-side DLL. Create a new text file with that name, and paste this code into it.
Then, change this line:
<level value="INFO" />
to this:
<level value="DEBUG" />
Once that's done, you can connect to the server using your Remote Desktop client.
On the server side, you need a configuration file that has the same name as your EXE, with the file extension .config
. So, if you're EXE's name is RDS_Server_TrayApp_BattMon.exe
, create a new text file called RDS_Server_TrayApp_BattMon.exe.config
, and paste this code in it.
Then, change this line:
<level value="INFO" />
to this:
<level value="DEBUG" />
Once that's done, you can start the EXE.
Here's my desired roadmap:
I know :wink:
All credit for Remote Desktop Virtual Channels communication goes to: https://www.codeproject.com/Articles/16374/How-to-Write-a-Terminal-Services-Add-in-in-Pure-C