-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.txt
35 lines (30 loc) · 1.68 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
how to install?
1. compile; i saved it as ram.exe
2. put in some safe place; i've put in %appdata%/local/rame.exe
3. open win10 Task Scheduler, create a new task
4. set run with highest privileges (optionally; see below), trigger: log on, action: run this .exe
Compile this file however you like to
I placed it in my Desktop folder and then issued:
C:\Users\<user>\Desktop> C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe /t:winexe /out:ram.exe trayicon.cs
(the part before greater-than sign is the working dir)
Then you should see three colorful icons in your System Tray
To use the CPU temperature widget we have to get the data from WMI
You can either:
-just run this script as admin and use all of its features
-disable temperature reading:
comment out this line:
TrayIcon batteryIcon = new TrayIcon("temp");
it should be line 19
-try to permit reading registers from ROOT\WMI namespace to your user
^ rather not-recommended and not very secure; but if you want to, here is some info:
https://wutils.com/wmi/root/wmi/msacpi_thermalzonetemperature/
tray icons may get stuck in the hidden area and i can do nothing with it:
https://stackoverflow.com/questions/15148886/stop-auto-hiding-tray-notification-icon
sometimes its just needed to promote them by the user themselves
+they are visible normally when you run .exe by hand, not from autostart
edit: if ran by Task Scheduler, they are normally visible
This program wouldn't exist without these two AMAZING pieces of code:
Accepted answer:
https://stackoverflow.com/questions/24004300/batch-file-get-cpu-temperature-in-c-and-set-as-variable/24005062#24005062
And this file:
https://github.com/kas/percentage/blob/master/percentage/percentage/TrayIcon.cs