Notifications
Clear all

We had a major storm through here recently and we suffered damage to the house roof and ceilings. I just received the quote to repair. I’m hoping that a small fraction of the 80,000 odd people that download SDIO and/or Desktop Info every month won’t mind chipping in a few dollars to help out. Click on the big blue button at the bottom of the page to help us keep a roof over our heads, literally!

Guests have read-only access to our forums. If you wish to participate you will need to register. Be sure to activate your account from the email sent to you when you register.

Lots of buttons

5 Posts
2 Users
1 Reactions
1,919 Views
Glenn
(@glenn)
Member Admin
Joined: 7 years ago
Posts: 1834
Topic starter  

I'm developing this as a tech tool.

1747731520-dti.webp

   
Quote
(@tastenchef)
New Member Registered
Joined: 6 months ago
Posts: 2
 

Looks awesome! Can you share the INI?


   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 7 years ago
Posts: 1834
Topic starter  

Posted by: @tastenchef

Looks awesome! Can you share the INI?

This is a variation on the advanced ini file. It only works properly in W mode.

Spoiler
tech ini
# Desktop Info by Glenn Delahoy
# Sample advanced configuration file
# This is specifically designed for window mode
# See the manual for a full description of all options

[options]

# size and position
top=0
right=5
width=450
font-size=10
font-face=Arial
server=1
auto-scale=1

# logging
log=%appdata%\DesktopInfo\desktopinfo.log
log-level=debugonerror

# options for window mode
[options-w]
top=70
width=900
height=800
font-size=10
font-face=Arial
formcolor=501020
auto-scale=1
display-offsetx=95
display-offsetxr=95

# logging
log=%appdata%\DesktopInfo\desktopinfo.log
log-level=debugonerror

[screen-saver]
font-size=20
width=1000
formcolor=501020

[text]
noresults=<n/a>
error=[error]
null-result=<null>
unknown=Unknown
executing=<executing>
menu-export=Export
menu-snapshot=Snapshot
menu-ini=Select Config
menu-reload=Reload
menu-configuration=Edit Configuration
menu-log=Open Log File
menu-manual=Read Manual
menu-wmode=Start W Mode
menu-about=About Desktop Info
menu-quit=Quit
nav-previous=Previous
nav-home=Home
nav-next=Next

[items]

# custom colors
# some common colors are preset
# you can add your own here
# see manual for details

# battery status lookup table
set battery1      = Disconnected
set battery2      = Connected
set battery3      = Fully Charged
set battery<null> = Not In Use

GROUP=id:summary, background-interval:10, items:local_time cpu topprocesscpu physicalram topprocessmem networkperf

# side toolbar
FONT-SIZE=9

# everything in this block is evaluated immediately after load
BEGIN-ONLOAD

BEGIN-IF=global:0, value1:%dtimode%, comp:eq, value2:WINDOW

BUTTON=global:0, x:-90, y:5,         width:80, height:34, button-color:#505090, display:Home,uri:{page}, args:home,hint:home page
BUTTON=global:1, x:-90, y:40,        width:80, height:34, button-color:#505090, display:Prev,uri:{page}, args:previous, hint:previous page
BUTTON=global:2, x:-90, y:75,        width:80, height:34, button-color:#505090, display:Next,uri:{page}, args:next,hint:next page
BUTTON=global:3, x:-90, y:110,       width:80, height:34, display:Windows Updates,uri:explorer,args:ms-settings:windowsupdate,hint:Windows updates
BUTTON=global:4, x:-90, y:145,       width:80, height:34, display:Network Connections,uri:%SystemRoot%\System32\control.exe,args:ncpa.cpl,hint:Network connections
BUTTON=global:5, x:-90, y:180,       width:80, height:34, display:Devices and Printers,uri:control,args:printers
BUTTON=global:6, x:-90, y:215,       width:80, height:34, font-size:8, display:Print Management,uri:printmanagement.msc
BUTTON=global:7, x:-90, y:250,       width:80, height:34, display:Device Manager,uri:devmgmt.msc
BUTTON=global:8, x:-90, y:285,       width:80, height:34, font-size:8, display:Performance Monitor,uri:perfmon
BUTTON=global:9, x:-90, y:320,       width:80, height:34, display:Event Viewer,uri:eventvwr
BUTTON=global:10, x:-90, y:355,       width:80, height:34, font-size:8, display:Disk Management, uri:diskmgmt.msc

BUTTON=global:11, xr:-10, y:5,       width:80, height:34, display:Resource Monitor, uri:resmon
BUTTON=global:12, xr:-10, y:40,       width:80, height:34, display:Control Panel, uri:control
BUTTON=global:13, xr:-10, y:75,       width:80, height:34, display:Shared Resources, uri:fsmgmt.msc
BUTTON=global:14, xr:-10, y:110,       width:80, height:34, display:Documents,uri:%userprofile%
BUTTON=global:15, xr:-10, y:145,       width:80, height:34, display:Task Manager,uri:taskmgr
BUTTON=global:16, xr:-10, y:180,       width:80, height:34, display:System Info,uri:msinfo32.exe
BUTTON=global:17, xr:-10, y:215,       width:80, height:34, display:Reliability Monitor,uri:%SystemRoot%\System32\perfmon.exe,args:/rel
BUTTON=global:18, xr:-10, y:250,       width:80, height:34, font-size:8, display:Print Management,uri:printmanagement.msc
BUTTON=global:19, xr:-10, y:285,       width:80, height:34, display:Command,uri:cmd.exe
BUTTON=global:20, xr:-10, y:320,       width:80, height:34, display:User Accounts,uri:control, args:userpasswords2
BUTTON=global:21, xr:-10, y:355,       width:80, height:34, display:Windows Settings,uri:ms-settings:
SETXY=global:22,x:0,y:0
END-IF

END-ONLOAD

#
#
#

# date/time
PAGE=1
PAGE-TITLE=Home Page
COLOR=%Cyan%
FONT-SIZE=10

# application banner
COMMENT=align:c,style:m,color:%white%,font-size:16,id:title,rich-text:1,text:\fwebdings\¿\fVerdana\ Desktop Info \i\by Glenn Delahoy

DATETIME=interval:5,background-interval:5,display:%11 %10,id:local_time
WMI=interval:60,hide-no-result:1,id:battery,text:Battery,\
  alarms:(%15 le 20 %red%) (%15 le 40 %orange%),namespace:root\cimv2,query:Win32_Battery,display:%EstimatedChargeRemaining%% (%battery%BatteryStatus%%)

# cpu
CORETEMP=interval:10,background-interval:10,display:%1%2, set:coretemp, hidden:1
CPU=background-interval:10,\
  alarms:(%1 ge 80 %red%)(%2 ge 60 %red%)(%3 ge 30 %orange%),\
  display:Tot: %1[2.0f]%\, Krnl: %2[2.0f]%\, Queue: %3\, %coretemp%
CHART=source-id:cpu, chart:filled max:100 border-color:%grey% series1:1 color1:00ff00 series2:2 color2:bb00bb series3:%3 color3:%red%

# following is an alternative cpu measurement using the WMI performance counters - this might be more accurate on newer machines
# WMI=interval:1,id:cputotal,text:Cpu,\
#   namespace:root\cimv2,query:Win32_PerfFormattedData_Counters_ProcessorInformation where Name like "_Total",\
#   chart:line2 scale:linear max:100 series1:%PercentProcessorUtility% color1:00ff00,threshold:80 0000ff, \
#   display:Total: %PercentProcessorUtility%%

TOPPROCESSCPU=interval:3,font-size:80%,text:Top Cpu,display:%1 (pid:%2) %3[1.1f]%

# memory
COMMENT=font-size:50%
COLOR=b0ffb0
PHYSICALRAM=interval:30,font-size:120%,alarms:(%3 ge 80 %red%),display:%1[3.1b]B / %2[3.1b]B (%3% used)
TOPPROCESSMEM=interval:10,font-size:80%,text:Top Memory,display:%1 (pid:%2) %3[1.1b]B
PAGEFAULTS=font-size:100%,alarms:(%5 le 80 2222c0),display:Tot: %1[1.0f]\, Hrd: %2[1.0f]\, Hit: %5[1.0f]%

# network
COMMENT=font-size:50%
COLOR=%Cyan%

NETWORKPERF=interval:2,background-interval:2, row-text:%instance%, log-counters:1, local:0, hide-no-result:1,\
  chart:line scale:log row-id:%instance% border-color:%grey% series1:%BytesReceivedPersec% color1:00ff00 series2:%BytesSentPersec% height:2 color2:bb00bb,\
  alarms:(%BytesReceivedPersec% ge {{%CurrentBandwidth%/8*95/100}} 2222ee)(%BytesSentPersec% ge {{%CurrentBandwidth%/8*95/100}} 0000ff),\
  display:R: %BytesReceivedPersec%[3.1b]Bps\, S: %BytesSentPersec%[3.1b]Bps\, B: %CurrentBandwidth%[1.0B]bps

# disks
COMMENT=font-size:50%
COLOR=%Silver%

# uses PDH for diskio values. set usewmi:1 to use wmi instead
LOGICALDRIVES=diskio:1,font-size:85%,chart:bar max:100 series1:7 threshold:75, text-align:l,\
  alarms:(%11 ge 10000000 0000f0)(%13 ge 10000000 0000f0)(%7 ge 90 0070f0),\
  row-text:Drive %1: (%2) %3|%chart%,\
  display:%6[1.0B]B/%5[1.0B]B (%7[1.1f]% used)|r: %11[1.1B]B/s\, w: %13[1.1B]B/s\, q: %17\, i: %19[1.1f]%\, avg sec/read: %15[1.3f]\, avg sec/wri: %16[1.3f]

# windows
PAGE=2
PAGE-TITLE=Windows
COLOR=%Cyan%

COMMENT=color:%White%,style:imb,text:Dates / Times
DATETIME=interval:10,display:%9 %10
TIMEZONE=interval:3600,display:%1 (%2)
WMI=interval:3600,text:Daylight Savings,namespace:root\cimv2,query:CIM_ComputerSystem,display:Enabled: %EnableDaylightSavingsTime%[b:Yes:No]\, In Effect: %DaylightInEffect%[b:Yes:No]
BOOTTIME=display:%9 %10
UPTIME=interval:60,display:%1 days %2 hrs %3 mins
COMMENT

COLOR=%White%

# windows configuration
COMMENT=color:%White%,style:imb,text:Windows Configuration
OSBUILD2=background-interval:3600,display:%1{{{ (%2)}}}|Build: %3{{{ (%18)}}}|Installed: %install_date_short% %install_time_short%\
 |Win Dir: %windowsdirectory%|Sys Dir: %systemdirectory%
SERVICEPACK=hide-no-result:1

USER=set:username,hidden:1,background-interval:3600
HOST=text:Host/User,display:%1/%username%,background-interval:3600
REG=interval:600,text:Firewall,value:HKLM\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\EnableFirewall,display:%1[b:Active:Not Active]
REG=interval:600,hide-no-result:1,text:Auto Update,value:HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Install\LastSuccessTime,display:%1
REG=interval:600,text:UAC Enabled,value:HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA,display:%1[b:Enabled:Disabled]
#Secureboot/UEFI status
REG=interval:600,hide-no-result:1,text:Secure Boot Status,value:HKLM\SYSTEM\CurrentControlSet\Control\SecureBoot\State\UEFISecureBootEnabled,display:%1[b:Enabled:Disabled]
WMI=text:Anti-Virus,namespace:root\SecurityCenter2,query:AntiVirusProduct,display:%displayName%|  %productState%[bit:4096:Enabled:Disabled] and %productstate%[bit:393216:up to date:not up to date]
IEVERSION
DIRECTX
VIRTUALDESKTOP=hide-no-result:1

SET-SECTION=key:pending-reboot,value:pending-reboot.ps1
CMD=interval:3600,text:Reboot Pending,trim:1,file:powershell.exe,parameters:%pending-reboot%,code-page:437,thread:1

SET-SECTION=key:windows-updates,value:windows-updates.ps1
CMD=interval:3600,text:Pending Updates,trim:1,file:powershell.exe,parameters:%windows-updates%,code-page:437,thread:1
comment

COMMENT=color:%White%,text:BitLocker Status,style:imb
SET-SECTION=key:bitlocker-status,value:bitlocker-status.ps1
set bitlocker-query=Local Fixed
CMD=interval:3600,text:Bitlocker Status,trim:1,file:powershell.exe,parameters:%bitlocker-status%,code-page:437,wide:1,font-face:Consolas

IF=value1:%dtimode%, comp:eq, value2:DESKTOP
BUTTON=wide:1, align:c, hyperlink:1, button-bevel:1, display:Windows Updates,uri:explorer,args:ms-settings:windowsupdate,hint:Windows updates
#IF=value1:%dtimode%, comp:eq, value2:WINDOW
#BUTTON=xr:5, y:0, align:r, display:Windows Updates,uri:explorer,args:ms-settings:windowsupdate,hint:Windows updates
COMMENT=font-size:50%

# network
PAGE=3
PAGE-TITLE=Network
COLOR=%cyan%

COMMENT=color:%White%,style:imb,text:Network
HOST
USER
DOMAIN=no-result:Workgroup
DOMAINCONTROLLER
DNSSERVER
WMI=interval:600,hide-no-result:1,text:Workgroup,namespace:root\cimv2,query:Win32_ComputerSystem, display:%Workgroup%
NETCONNECTIONS=interval:5
NETPACKETS=interval:5,display:r:%1[1.0n]  s:%2[1.0n]
NETPACKETSRATE=interval:5,text:Net Rate,mtu:1500,display:r:%1[1.1b]Bps  s:%2[1.1b]Bps
WMI=interval:60,background-interval:60,id:latency,font-size:120%,\
  chart: type:line series1:%ResponseTime%,\
  alarms:(%11 ge 100 0088f0),text:Network Latency, \
  namespace:root\cimv2,query:Win32_PingStatus where address='google.com',\
  display:%ResponseTime%ms (google.com) %chart%
COLOR=%silver%
NETWORKINTERFACES=interval:30,font-size:85%,operstatus:1,iftype:6 23 71 243,ipv4list: %8/%10|,ipv6list:  %11|, row-text:%2|%4|link: t:%23[1.0B]Bps\, r:%24[1.0B]Bps,display:%8/%10 (%14)| gw:%17| dns:%15| dhcp:%19|  %25 {{{|  ipv6:%26}}}
SET-SECTION=key:wifi-status,value:wifi-status.ps1
CMD=interval:120,color:55cc77,text:WiFi Status,wide:1,thread:1,read-as-csv:1,csv-header:1,file:powershell.exe, \
  parameters:-Command %wifi-status%,trim:1,show-window:0,hide-no-result:1, \
  display:SSID: %SSID%   Encryption: %Auth% / %Cipher%|   BaseStation ID: %BSSID%   Type: %NetType%|   Radio: %Radio%   Band: %Band%   Channel: %Channel%   Signal: %Signal%

COLOR=%orange%
CHART=interval:2, source-id:networkperf, row-text:%instance%, chart:line scale:log row-id:%instance% series1:%BytesReceivedPersec% color1:00ff00 series2:%BytesSentPersec% height:2 color2:bb00bb,\
  display:R: %BytesReceivedPersec%[3.1b]Bps\, S: %BytesSentPersec%[3.1b]Bps\, B: %CurrentBandwidth%[1.0B]bps

HTTPGET=interval:600,text:External ipv4,source: http://ipecho.net/plain 
HTTPGET=interval:3600,text:External ipv6,source:http://[ipv6.plain-text-ip.com],font-size:85%

COLOR=%silver%
COMMENT=color:%White%,style:imb,text:Remote Desktop
RDS=interval:20,font-size:80%,row-text:Console Session ID|Current Session|Address,display:%2|sid:%3 %7\%6|%8
COMMENT=color:%White%,style:imb,text:Remote Desktop Sessions
RDSSESSIONS=interval:20,font-size:80%,row-text:%1,display:sid:%2 state:%3[e:Active:Connected:ConnectQuery:Shadow:Disconnected:Idle:Listen:Reset:Down:Init]

IF=value1:%dtimode%, comp:eq, value2:DESKTOP
BUTTON=wide:1,align:c,color:%orange%,text:,display:Network Connections,uri:%SystemRoot%\System32\control.exe,args:ncpa.cpl,hint:Network connections
#IF=value1:%dtimode%, comp:eq, value2:WINDOW
#BUTTON=xr:5, y:0, align:r, text:,display:Network Connections,uri:%SystemRoot%\System32\control.exe,args:ncpa.cpl,hint:Network connections

# hardware
PAGE=4
PAGE-TITLE=Hardware
COLOR=%Cyan%

COMMENT=color:%White%,style:imb,text:Hardware
WMI=interval:60,hide-no-result:1,text:Battery,namespace:root\cimv2,query:Win32_Battery,display:%EstimatedChargeRemaining%% (%battery%BatteryStatus%%)
OEMINFO=display:%2,hide-no-result:1
WMI=interval:10,id:temp,hide-no-result:1,maxrows:1,text:Cpu Temp, set:mbtemp={{%CurrentTemperature%/10-273.15}}[1.0f]C,\
  namespace:root\wmi,query:MSAcpi_ThermalZoneTemperature, hidden:1
WMI=text:Motherboard,namespace:root\cimv2,query:Win32_Baseboard,display:%Manufacturer% %Product% (%mbtemp%)
WMI=text:Bios,namespace:root\cimv2,query:Win32_Bios,display:%Caption%|Ser: %SerialNumber%
WMI=text:Trusted Platform Module,namespace:root\cimv2\Security\MicrosoftTpm,query:Win32_Tpm,\
 display:Active:%IsActivated_InitialValue%[b:Yes:No]\, Enabled:%IsEnabled_InitialValue%[b:Yes:No]\, Owned:%IsOwned_InitialValue%[b:Yes:No]\
 |Version: %SpecVersion%\, Manuf Vers: %ManufacturerVersion%\
 |Info: %ManufacturerVersionInfo%\
 |Manuf Id: %ManufacturerId%\
 |Phys Version: %PhysicalPresenceVersionInfo%
WMI=text:Audio Controller,namespace:root\cimv2,query:Win32_SoundDevice,display:%Caption%

# display hardware
comment
comment=text:Display Hardware,style:imb,color:%white%
# get the windows major version
OSBUILD=set:winmajor=%2,hidden:1
# vista or later
IF=value1:%winmajor%,value2:6,comparator:ge
WMI=namespace:root\cimv2,query:Win32_VideoController,\
  text:Display Adapters, display:%caption% (%CurrentHorizontalResolution%x%CurrentVerticalResolution%x%CurrentBitsPerPixel%)
# earlier than vista
IF=value1:%winmajor%,value2:6,comparator:lt
WMI=namespace:root\cimv2,query:Win32_DisplayControllerConfiguration,\
  text:Display Adapters, display:    %caption%   (%HorizontalResolution%x%VerticalResolution%x%BitsPerPixel%)

comment=text:Monitors,color:%white%
comment=display:  Ndx  Wdth  Hght  Left   Top   Ppi Pri Desc, font-face:Consolas
MONITORS=interval:10,wide:1, font-face:consolas, display:%curr%[b:*: ] %num%[3.0f] %width%[5.0f] %height%[5.0f] %left%[5.0f] %top%[5.0f] %ppi%[5.0f] %primary%[b:Pri:   ] %desc%

comment
COMMENT=color:%White%,style:imb,text:Serial Ports
WMI=interval:10,font-size:80%,id:PnPPorts,text:PnP Ports,namespace:root\cimv2,query:Win32_PnPEntity where name like "%(COM%",display:%caption%,set:deviceid
WMI=interval:10,font-size:80%,id:SerialPorts,text:Serial Ports,namespace:root\wmi,query:MSSerial_PortName,display:%PortName%\, %InstanceName%
COMMENT=font-size:50%

# printers
PAGE=5
PAGE-TITLE=Printers

comment=text:Printers, style:imb, color:%white%
PRINTERS=wide:1, rich-text:1, display:\c%white%\\b\%printer_name%|   \c%silver%\Server:%server_name% %shared%[b: Shared as %share_name%: ] Port:%port_name%\,   Attributes:%queued%[b: Queued:]%direct%[b: Direct:]%default%[b: Default:]%shared%[b: Shared:]%network%[b: Network:]%hidden%[b: Hidden:]%local%[b: Local:]

# cpu
PAGE=6
PAGE-TITLE=Cpu

COMMENT=color:%White%,style:imb,text:CPU
CPUTYPE=font-size:80%, maxrows:1, row-text:Cpu %instance%, display:%ProcessorNameString%|Vendor: %VendorIdentifier%|%Identifier%|Speed: %~MHz%[2.2K]GHz
CPUCOUNT=font-size:80%,display:%1\, %2
WMI=interval:5,font-size:80%,text:CPU Info,namespace:root\cimv2,query:Win32_Processor,display:Speed:%MaxClockSpeed%MHz   Current:%CurrentClockSpeed%MHz
WMI=interval:5,hide-no-result:1,text:Cpu Temp,namespace:root\wmi,query:MSAcpi_ThermalZoneTemperature,display: {{%CurrentTemperature%/10-273.15}}[1.1f]C
CPU=background-interval:10,wide:1, chart:filled max:100 border:0 series1:1 color1:00ff00 series2:2 color2:0000bb,\
  alarms:(%1 ge 80 0000ff)(%2 ge 40 0000ff),\
  display:Total: %1[2.0f]%\, Kernel: %2[2.0f]%\, Queue: %3\, %coretemp%| \
  Processes: %Processes%\, Threads: %Threads%|\
  Sys Calls/sec: %SystemCallsPersec%[2.0f]\, Con Switches/sec: %ContextSwitchesPersec%[2.0f]\, Exc Disps/sec: %ExceptionDispatchesPersec%[2.0f]

CPUUSAGE=wide:1, font-face:Consolas, font-size:8, rich-text:1, align:c,\
  chart:bar max:100 border-color:%grey%  series1:%PercentProcessorTime% color1:c00000 threshold:80 width:230,\
  display:Core %1: \c%white%\%2[3.0f]% %chart%

COMMENT
COMMENT=color:%White%,style:u,text:Top Processes,align:c
TOPPROCESSCPU=interval:3,wide:1,align:c,font-face:Consolas,maxrows:10,display:%1[0.25s]%2[0.10s]%3[4.1f]%

IF=value1:%dtimode%, comp:eq, value2:DESKTOP
BUTTON=wide:1,color:%orange%,text:,display:Performance Monitor,uri:perfmon
#IF=value1:%dtimode%, comp:eq, value2:WINDOW
#BUTTON=xr:5, y:0, align:r, color:%white%, text:,display:Performance Monitor,uri:perfmon

# Bios
PAGE=7
PAGE-TITLE=Bios

COMMENT=color:%White%,style:imb,text:BIOS
REG2=key:HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\BIOS,values-to-rows:1

# system event logs
PAGE=8
PAGE-TITLE=System Event Logs
COLOR=%White%

COMMENT=style:imb,text:System Event Logs
EVENTLOG=interval:60,font-size:80%,log:System,maxrows:40,row-text:%1| ID: %2| Type: %3\, Task: %4, display:Source: %5|Computer: %6|%7|%8|%9|%10

IF=value1:%dtimode%, comp:eq, value2:DESKTOP
BUTTON=wide:1, align:r, color:%orange%,text:,display:Event Viewer,uri:eventvwr
#IF=value1:%dtimode%, comp:eq, value2:WINDOW
#BUTTON=xr:5, y:0, align:r, text:,display:Event Viewer,uri:eventvwr

PAGE=9
PAGE-TITLE=Application Event Logs

# application event logs
COMMENT=style:imb,text:Application Event Logs
EVENTLOG=interval:6,font-size:80%,log:Application,maxrows:40, row-text:%1| ID: %2| Type: %3\, Task: %4, display:Source: %5|Computer: %6|%7|%8|%9|%10

IF=value1:%dtimode%, comp:eq, value2:DESKTOP
BUTTON=wide:1, align:r, color:%orange%,text:,display:Event Viewer,uri:eventvwr
#IF=value1:%dtimode%, comp:eq, value2:WINDOW
#BUTTON=xr:5, y:0, align:r, text:,display:Event Viewer,uri:eventvwr

# physical disks
PAGE=10
PAGE-TITLE=Physical Disks

COMMENT=color:%White%,style:imb,text:Physical Disks
PHYSICALDRIVES=interval:60,font-size:80%,regex:^[ \t]+|[ \t]+$,row-text:%1|%12,display:%3|%4|id: %5|Media: %9|Model: %10|Serial: %13|Size: %14[1.0B]B\, Status: %15

COMMENT=color:%White%,style:imb,text:Logical Drives
LOGICALDRIVES=diskio:1,font-size:85%,chart:bar max:100 series1:7 threshold:75, text-align:l,\
  alarms:(%11 ge 10000000 0000f0)(%13 ge 10000000 0000f0)(%7 ge 90 0070f0),\
  row-text:Drive %1: (%2) %3|%chart%,\
  display:%6[1.0B]B/%5[1.0B]B (%7[1.1f]% used)|r: %11[1.1B]B/s\, w: %13[1.1B]B/s\, q: %17\, i: %19[1.1f]%\
    |avg sec/read: %15[1.3f]\,  avg sec/wri: %16[1.3f]


# memory
PAGE=11
PAGE-TITLE=Memory
COLOR=%Cyan%

COMMENT=color:%White%,style:imb,text:Physical RAM
# %MemoryType% is enumerated type
WMI=namespace:root\cimv2,query:Win32_PhysicalMemory,row-text:%BankLabel%,display:%Capacity%[1.0b]B %DeviceLocator% \
  %MemoryType%[e:Unknown:Other:DRAM:Sync DRAM:Cache DRAM:EDO:EDRAM:VRAM:SRAM:RAM:ROM:Flash:EEPROM:FEPROM:EPROM:CDRAM:3DRAM:SDRAM:SGRAM:RDRAM:DDR:DDR2:DDR2 FB-DIMM:Unknown:DDR3:FBD2:DDR4]\
  |%Manufacturer%
COMMENT
MEMORY=interval:5,display: Phys: %physusedbytes%[3.1b]B / %phystotalbytes%[3.1b]B (%physusedpct%% used)|\
 Virt: %virtusedbytes%[3.1b]B / %virttotalbytes%[3.1b]B (%virtusedpct%% used)|\
 Page: %pageusedbytes%[3.1b]B / %pagetotalbytes%[3.1b]B (%pageusedpct%% used)
PAGEFILE=interval:5, display:%used%[1.1b]B / %total%[1.1b]B (%usedpct%%)
TOPPROCESSPF=interval:5,maxrows:5,font-size:80%,text:Top Processes PF,display:%1 (pid:%2) %3[1.2B] faults
comment
COMMENT=color:%White%,style:imb,text:Performance
PERF=path:\Memory\*, wide:1, local:0, color:%lightgrey%, \
  alarms:({{(%PageFaultsPersec%-%PagesPersec%)/%PageFaultsPersec%*100}} le 80 2222c0), \
  chart:pie height:6 border:1 series1:{{(%PageFaultsPersec%-%PagesPersec%)/%PageFaultsPersec%*100}} series2:{{100-((%PageFaultsPersec%-%PagesPersec%)/%PageFaultsPersec%*100)}} color2:#000000,\
  display:Page Faults/sec: %PageFaultsPersec%[1.0f]\, Hard Faults/sec: %PagesPersec%[1.0f]\, Hit Rate: {{(%PageFaultsPersec% - %PagesPersec%) / %PageFaultsPersec% * 100}}[1.1f]% |\
  Available: %AvailableBytes%[1.1B]B\, Committed: %CommittedBytes%[1.1B]B\, Committed In Use: %PercentCommittedBytesInUse%[1.1f]%|                                   %chart%

COMMENT=color:%White%,style:imb,text:Top Processes
TOPPROCESSMEM=interval:3,wide:1,align:c,font-face:Consolas,maxrows:10,counter:pu,display:%1[0.30s] pid:%2[0.10s] %3[6.1b]B
COMMENT

IF=value1:%dtimode%, comp:eq, value2:DESKTOP
BUTTON=wide:1, align:c, color:%orange%, text:,display:Resource Monitor, uri:resmon
#IF=value1:%dtimode%, comp:eq, value2:WINDOW
#BUTTON=xr:5, y:0, align:r, color:%white%, text:,display:Resource Monitor, uri:resmon

# installed software
PAGE=12
PAGE-TITLE=Software
COLOR=%Silver%
WIDE=1

COMMENT=color:%White%,style:imb,text:Installed Software - Windows Installer
CMD=font-face:Consolas,font-size:80%,trim:1,file:cmd.exe,parameters:/c wmic product get name\,version,thread:1
COMMENT=color:%White%,style:imb,text:Installed Software - 32 bit
REG2=font-face:consolas,font-size:80%,thread:1,wow:32,subkeys:1,values:DisplayName\,DisplayVersion,key:HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall,display:%DisplayName%[0.56s] %DisplayVersion% 
COMMENT=color:%White%,style:imb,text:Installed Software - 64 bit
REG2=font-face:consolas,font-size:80%,thread:1,wow:64,subkeys:1,values:DisplayName\,DisplayVersion,key:HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall,display:%DisplayName%[0.56s] %DisplayVersion%

IF=value1:%dtimode%, comp:eq, value2:DESKTOP
BUTTON=align:c, color:%orange%, display:Control Panel, uri:control
#IF=value1:%dtimode%, comp:eq, value2:WINDOW
#BUTTON=xr:5, y:0, align:r, color:%white%, display:Control Panel, uri:control

# shared resources
PAGE=13
PAGE-TITLE=Shared Resources
COLOR=%Grey%
WIDE=0

# shared resources type lookup table
set share_type_0          = Disk Drive
set share_type_1          = Print Queue
set share_type_2          = Device
set share_type_3          = IPC
set share_type_2147483645 = IPC Admin
set share_type_2147483648 = Disk Drive Admin
set share_type_2147483649 = Print Queue Admin
set share_type_2147483650 = Device Admin
set share_type_2147483651 = IPC Admin

COMMENT=color:%White%,text:Shared Resources,style:imb
WMI=interval:60,text:Shared Resources, namespace:root\cimv2, query:Win32_Share,row-text:%Name%|  (%share_type_%Type%%),display:%Caption%|%path%|Status: %Status%

IF=value1:%dtimode%, comp:eq, value2:DESKTOP
BUTTON=wide:1 ,align:c, color:%white%, display:Shared Resources, uri:fsmgmt.msc
#IF=value1:%dtimode%, comp:eq, value2:WINDOW
#BUTTON=xr:5, y:0, align:r, color:%white%, display:Shared Resources, uri:fsmgmt.msc

# netstats 1
PAGE=14
PAGE-TITLE=Net Stats - Connections
COLOR=%Grey%
FONT-FACE=Consolas
FONT-SIZE=8
WIDE=1

# connection states
set netstate<null> = 
set netstate1 = closed
set netstate2 = listen
set netstate3 = syn_sent
set netstate4 = syn_rcvd
set netstate5 = estab
set netstate6 = fin_wait1
set netstate7 = fin_wait2
set netstate8 = close_wait
set netstate9 = closing
set netstate10 = last_ack
set netstate11 = time_wait
set netstate12 = delete_tcb

# TCP/UDP connections (traffic for tcp connections)
COMMENT=color:%White%,style:imb,text:Net Stats - Active Connections
COMMENT=style:bi,text:image                pid  ipv     prot local address        remote address       state    sent bytes   send b/sec    rcvd bytes    rcv b/sec
NETSTATS=interval:1,filter-state:3 4 5 6 7 8 9,stats:1,\
  display:%module%[0.18s] %pid%[5.0f]  ipv%ipv%[0.4s] %prot%  %laddrf%[0.20s] %raddrf%[0.20s] %netstate%state%%[0.8s] %databytesout%[9.0k]k    %databytesoutpersec%[9.0f]    %databytesin%[9.0k]k    %databytesinpersec%[9.0f]
		  
# netstats 2
PAGE=15
PAGE-TITLE=Net Stats - Listening
COLOR=%Grey%
FONT-FACE=Consolas
FONT-SIZE=8
WIDE=1

# TCP/UDP all listening connections		 
COMMENT=color:%White%,style:imb,text:Net Stats - Listening
COMMENT=style:ib,text:image                pid  ipv   prot local addr           state
NETSTATS=interval:1,filter-state:2,display:%module%[0.18s] %pid%[5.0f]  ipv%ipv%  %prot%  %laddrf%[0.20s] %netstate%state%%

# bluetooth
PAGE=16
PAGE-TITLE=Bluetooth
COLOR=%Silver%
FONT-FACE=Arial
FONT-SIZE=10
WIDE=0
COMMENT=color:%White%,style:imb,text:Bluetooth
# %bluetooth_state% is enumerated type
BLUETOOTH=interval:10, display:State: %bluetooth_state%[e:Disconnected:Connected]|Adapter: %adapter_name%\, Address: %adapter_address%|\
  State: %adapter_state%[e:Off:On:Discovering]\, Num Devices: %num_devices%|Scan Mode: %scan_mode%[e:None:Connectable:Discoverable]
COMMENT=color:%White%,style:imb,text:Bluetooth Devices
BTDEVICES=interval:10, thread:2, service-multirow:1, row-text:%name%|  %ispaired%[b:Paired:Not Paired], display:%address%|State: %state%[e:None:Paired:Connected]\, BT Type: %bluetooth_type%[e:Unknown:Classic:LE:Dual]\, Svcs: %num_services% |%services%

# chart demonstration
PAGE=17
PAGE-TITLE=Chart Demonstration
COLOR=%white%
WIDE=0

begin-onload=2
set xx=0.1
set pie=0
end-onload

set xx={{%xx%+0.1}}
set sinx={{sin(%xx%)*100}}
set r1={{Rnd(100)}}
set r2={{Rnd(100)}}
set pie={{%pie%+1}}
if=value1:%pie%, comp:gt, value2:100
set pie=0
COMMENT=color:%plum%,font-face:Segoe Script, font-size:18, text:Chart Demonstration, style:imb, align:c
TEXT=interval:3,text:Horizontal Bar,      style:b, chart:bar        height:2 series1:{{rnd(100)}} threshold:75 series2:{{rnd(100)}} threshold:60
comment
TEXT=interval:3,text:%chart%,             style:b, chart:bar        height:2 series1:{{rnd(100)}} threshold:75 series2:{{rnd(100)}} threshold:60, display:Horizontal Bar in the left column,
comment
TEXT=interval:1,text:Line,                style:b, chart:line       height:3 border:0 points:90 series1:{{%r1%}} color1:00ff00
comment
TEXT=interval:3,text:Filled (with negative values), style:b, chart:filled     height:3 border:0 points:40 series1:{{rnd(100)}} color1:00ff00 series2:{{rnd(50)}} color2:bb00bb series3:{{Neg(rnd(40))}} color3:#0000f0 width:140,align:c
comment
TEXT=interval:4,text:VBar,                style:b, chart:vbar       height:3 border:0 points:10 series1:{{rnd(100)}} color1:00ff00 series2:{{rnd(100)}} color2:bb00bb series3:{{rnd(50)}} color3:#0000f0
comment
TEXT=interval:8,text:%chart%,             style:b, chart:vbarfilled height:3 border:0 points:1 series1:{{rnd(60)}} color1:00ff00 series2:{{rnd(60)+20}} color2:bb00bb series3:{{rnd(60)+20}} color3:#0000f0, display:VBarFilled (1 point) in the left column, align:c
comment
TEXT=interval:1,text:Scatter (sine plot), style:b, chart:scatter    height:3 border:0 series1:{{%sinx%}} color1:00fff0
comment
TEXT=interval:4,wide:1,text:3D,           style:b, chart:3d         height:3 border:0 points:10 series1:{{rnd(100)-50}} color1:00f090 series2:{{rnd(100)-50}} color2:bb00bb series3:{{Neg(rnd(40))}} color3:#0000f0
comment
TEXT=interval:1,text:Pie (value=%pie%%),  style:b, chart:pie        height:6 border:1 series1:%pie% series2:{{100-%pie%}} color2:#000000

#
# sample scripts
# following sections are some sample scripts used by CMD items
# see the SET-SECTION and CMD items in the reference manual for details
# these used to be text files in a sub-directory called 'sample-scripts'
#


[windows-updates.ps1]
try {
  $msUpdateSession = New-Object -ComObject Microsoft.Update.Session
  $UpdateSearcher = $msUpdateSession.CreateUpdateSearcher()
  $SearchResult = $UpdateSearcher.Search('IsHidden=0 and IsInstalled=0')
  $totalUpdates = $($SearchResult.Updates.count)

  Write-Host "$totalUpdates"
}
catch {
  Write-Host '<error>'
  }

#
# Pending Windows Reboot
# SET-SECTION=key:pending-reboot,value:pending-reboot.ps1
# CMD=interval:3600,text:Reboot Pending,trim:1,file:powershell.exe,parameters:%pending-reboot%,code-page:437
#

[pending-reboot.ps1]
function Test-PendingReboot
{
    [CmdletBinding()]
    param
    (
        [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
        [Alias('CN', 'Computer')]
        [String[]]
        $ComputerName = $env:COMPUTERNAME,

        [Parameter()]
        [System.Management.Automation.PSCredential]
        [System.Management.Automation.CredentialAttribute()]
        $Credential,

        [Parameter()]
        [Switch]
        $Detailed,

        [Parameter()]
        [Switch]
        $SkipConfigurationManagerClientCheck,

        [Parameter()]
        [Switch]
        $SkipPendingFileRenameOperationsCheck
    )

    process
    {
        foreach ($computer in $ComputerName)
        {
            try
            {
                $invokeWmiMethodParameters = @{
                    Namespace    = 'root/default'
                    Class        = 'StdRegProv'
                    Name         = 'EnumKey'
                    ComputerName = $computer
                    ErrorAction  = 'Stop'
                }

                $hklm = [UInt32] "0x80000002"

                if ($PSBoundParameters.ContainsKey('Credential'))
                {
                    $invokeWmiMethodParameters.Credential = $Credential
                }

                ## Query the Component Based Servicing Reg Key
                $invokeWmiMethodParameters.ArgumentList = @($hklm, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\')
                $registryComponentBasedServicing = (Invoke-WmiMethod @invokeWmiMethodParameters).sNames -contains 'RebootPending'

                ## Query WUAU from the registry
                $invokeWmiMethodParameters.ArgumentList = @($hklm, 'SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\')
                $registryWindowsUpdateAutoUpdate = (Invoke-WmiMethod @invokeWmiMethodParameters).sNames -contains 'RebootRequired'

                ## Query JoinDomain key from the registry - These keys are present if pending a reboot from a domain join operation
                $invokeWmiMethodParameters.ArgumentList = @($hklm, 'SYSTEM\CurrentControlSet\Services\Netlogon')
                $registryNetlogon = (Invoke-WmiMethod @invokeWmiMethodParameters).sNames
                $pendingDomainJoin = ($registryNetlogon -contains 'JoinDomain') -or ($registryNetlogon -contains 'AvoidSpnSet')

                ## Query ComputerName and ActiveComputerName from the registry and setting the MethodName to GetMultiStringValue
                $invokeWmiMethodParameters.Name = 'GetMultiStringValue'
                $invokeWmiMethodParameters.ArgumentList = @($hklm, 'SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName\', 'ComputerName')
                $registryActiveComputerName = Invoke-WmiMethod @invokeWmiMethodParameters

                $invokeWmiMethodParameters.ArgumentList = @($hklm, 'SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\', 'ComputerName')
                $registryComputerName = Invoke-WmiMethod @invokeWmiMethodParameters

                $pendingComputerRename = $registryActiveComputerName -ne $registryComputerName -or $pendingDomainJoin

                ## Query PendingFileRenameOperations from the registry
                if (-not $PSBoundParameters.ContainsKey('SkipPendingFileRenameOperationsCheck'))
                {
                    $invokeWmiMethodParameters.ArgumentList = @($hklm, 'SYSTEM\CurrentControlSet\Control\Session Manager\', 'PendingFileRenameOperations')
                    $registryPendingFileRenameOperations = (Invoke-WmiMethod @invokeWmiMethodParameters).sValue
                    $registryPendingFileRenameOperationsBool = [bool]$registryPendingFileRenameOperations
                }

                ## Query ClientSDK for pending reboot status, unless SkipConfigurationManagerClientCheck is present
                if (-not $PSBoundParameters.ContainsKey('SkipConfigurationManagerClientCheck'))
                {
                    $invokeWmiMethodParameters.NameSpace = 'ROOT\ccm\ClientSDK'
                    $invokeWmiMethodParameters.Class = 'CCM_ClientUtilities'
                    $invokeWmiMethodParameters.Name = 'DetermineifRebootPending'
                    $invokeWmiMethodParameters.Remove('ArgumentList')

                    try
                    {
                        $sccmClientSDK = Invoke-WmiMethod @invokeWmiMethodParameters
                        $systemCenterConfigManager = $sccmClientSDK.ReturnValue -eq 0 -and ($sccmClientSDK.IsHardRebootPending -or $sccmClientSDK.RebootPending)
                    }
                    catch
                    {
                        $systemCenterConfigManager = $null
                        Write-Verbose -Message ($script:localizedData.invokeWmiClientSDKError -f $computer)
                    }
                }

                $isRebootPending = $registryComponentBasedServicing -or `
                    $pendingComputerRename -or `
                    $pendingDomainJoin -or `
                    $registryPendingFileRenameOperationsBool -or `
                    $systemCenterConfigManager -or `
                    $registryWindowsUpdateAutoUpdate

                if ($PSBoundParameters.ContainsKey('Detailed'))
                {
                    [PSCustomObject]@{
                        ComputerName                     = $computer
                        ComponentBasedServicing          = $registryComponentBasedServicing
                        PendingComputerRenameDomainJoin  = $pendingComputerRename
                        PendingFileRenameOperations      = $registryPendingFileRenameOperationsBool
                        PendingFileRenameOperationsValue = $registryPendingFileRenameOperations
                        SystemCenterConfigManager        = $systemCenterConfigManager
                        WindowsUpdateAutoUpdate          = $registryWindowsUpdateAutoUpdate
                        IsRebootPending                  = $isRebootPending
                    }
                }
                else
                {
                    [PSCustomObject]@{
                        ComputerName    = $computer
                        IsRebootPending = $isRebootPending
                    }
                }
            }

            catch
            {
                Write-Verbose '$Computer`: $_'
            }
        }
    }
}

# Test-PendingReboot
if ((Test-PendingReboot).IsRebootPending) {
Write-Host "Reboot Pending"
} else {
Write-Host "No Reboot Pending"
}



[bitlocker-status.ps1]
## Get BitLocker drive status for DesktopInfo
## Does NOT require Admin rights
##
## To work properly, PowerShell Execution Policy must be set to RemoteSigned.
##
## Get arguments for Local or Removable
## Valid parameters are 'Local Fixed' or 'Removable'
$query = '%bitlocker-query%'
If ( -not $query ) { Exit 1 }

## set status values
$blStatusDesc = @(
				[pscustomobject]@{desc='Status Unknown'}
				[pscustomobject]@{desc='Fully Encrypted'}
				[pscustomobject]@{desc='Unencrypted'}
				[pscustomobject]@{desc='Encryption in Progress'}
				[pscustomobject]@{desc='Decryption in Progress'}
				[pscustomobject]@{desc='Encryption Suspended'}
				[pscustomobject]@{desc='Decryption Suspended'}
				)

## Output headers
Write-Host ('Name ')('Size').PadLeft(16)('Free Space').PadLeft(16)BitLocker

## get local volumes using WMI
ForEach ( $logicalVol in (Get-CimInstance -Class Win32_LogicalDisk | Where-Object Description -like "$query*") ) {
	$blStatus=(New-Object -ComObject Shell.Application).NameSpace($($logicalVol.Name)).Self.ExtendedProperty('System.Volume.BitLockerProtection')
	Write-Host $logicalVol.Name.ToString().PadRight(5),($logicalVol.Size /1000000000).ToString('N0').PadLeft(13)MB,($logicalVol.FreeSpace/1000000000).ToString('N0').PadLeft(13)MB, $blStatusDesc[$blStatus].desc
}

[wifi-status.ps1]
$wifi_status = @( netsh wlan show interfaces ).Replace(' : ',' = ')
$wifi_status = $wifi_status.Split('=').Trim()

If ( -not $wifi_status.Contains('connected') ) { Exit 0 }

$State = $wifi_status[ [Array]::indexOf($wifi_status,'State') + 1 ]
$SSID = $wifi_status[ [Array]::indexOf($wifi_status,'SSID') + 1 ]
$BSSID = $wifi_status[ [Array]::indexOf($wifi_status,'BSSID') + 1 ]
$NetType = $wifi_status[ [Array]::indexOf($wifi_status,'Network type') + 1 ]
$Radio = $wifi_status[ [Array]::indexOf($wifi_status,'Radio type') + 1 ]
$Auth = $wifi_status[ [Array]::indexOf($wifi_status,'Authentication') + 1 ]
$Cipher = $wifi_status[ [Array]::indexOf($wifi_status,'Cipher') + 1 ]
$Band = $wifi_status[ [Array]::indexOf($wifi_status,'Band') + 1 ]
$Channel = $wifi_status[ [Array]::indexOf($wifi_status,'Channel') + 1 ]
$Signal = $wifi_status[ [Array]::indexOf($wifi_status,'Signal') + 1 ]

# Output headers and data
Write-Host State ',' SSID ',' BSSID ',' NetType ',' Radio ',' Auth ',' Cipher ',' Band ',' Channel ',' Signal
Write-Host $State ',' $SSID ',' $BSSID ',' $NetType ',' $Radio ',' $Auth ',' $Cipher ',' $Band ',' $Channel ',' $Signal

 


   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 7 years ago
Posts: 1834
Topic starter  

This is a starting point. No doubt it can be refined further. I notice the server is on in this ini.  You probably want to remove that.


   
ReplyQuote
(@tastenchef)
New Member Registered
Joined: 6 months ago
Posts: 2
 

@glenn Thanks a lot!


   
Glenn reacted
ReplyQuote
Glenn's Page