Category Archives: #Win32

Specs for my first self-funded computer

This was on my UVI student web-server website.  Amazing how long I have come.

Powershell – Max the bright

This script increases the brightness to max

set-ExecutionPolicy remotesigned -force
(Get-WmiObject -Namespace root/WMI -Class WmiMonitorBrightnessMethods).WmiSetBrightness(1,100)

Laptop battery test script – win32

To test the time that a laptop battery takes to  discharge, I wrote this script that would just print the time to a text file on the My Documents Directory every 10 seconds.  When completely discharged, just look at the time it stopped recording.

  1. Power on laptop on AC Power
  2. Run Program
  3. Remove AC Power
  4. Let battery power discharge
  5. Analyse text file.


  • Monitor battery load
  • Email (?)

Source Code:

#include <Date.au3>

$ts = _Date_Time_SystemTimeToDateTimeStr(_Date_Time_GetSystemTime())
$tstart3=StringReplace($tstart2,” “,”_”)

while 1
$ts = _Date_Time_SystemTimeToDateTimeStr(_Date_Time_GetSystemTime())
FileCreate(@MyDocumentsDir & “\battery_” & $tstart3 & “.txt”,$ts & @CRLF)

; Create a file.
Func FileCreate($sFilePath, $sString)
Local $bReturn = True
$bReturn = FileWrite($sFilePath, $sString)
Return $bReturn
EndFunc ;==>FileCreate