Modifications, improvements are welcome. I'd like to include more system info, so if somebody knows how to reliably retrieve information about installed printers, graphic card, processor speed etc. on all OS's (Win 98, XP etc.) ...
;;; Author: Kostic Dejan ;;; OS: Windows 98SE ;;; AHK Version: 1.0.37.04 ;;; Date: 12.01.2006 FormatTime, dat,,dd.MM.yyyy FormatTime, vrem,A_now,HH:mm RegRead,tif,HKCU,Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders,Cache ;get TIF folder FileSelectFolder, folder, , 3, Select a drive to analyze: if folder = return DriveGet, list, list ;example code from help file DriveGet, cap, capacity, %folder% DrivespaceFree, free, %folder% DriveGet, fs, fs, %folder% DriveGet, label, label, %folder% DriveGet, serial, serial, %folder% DriveGet, type, type, %folder% DriveGet, status, status, %folder% statString:=MemGetStats() StringSplit, stats, statString, | Gui,font,s9 Gui, Add, ListView, vDriveInfoListView x10 w410 r32, Data|Value LV_Add("","Date:",dat) LV_Add("","Time:",vrem) LV_Add("","OS:",a_osversion) LV_Add("","User name:",a_username) LV_Add("","Computer name:",a_computername) LV_Add("","Windows folder:",a_windir) LV_Add("","Desktop folder:",a_desktop) LV_Add("","Start menu folder:",a_startmenu) LV_Add("","Startup folder:",a_startup) LV_Add("","Temp folder:",temp) LV_Add("","Programs folder:",a_programfiles) LV_Add("","My documents:",a_mydocuments) LV_Add("","Temporary Internet folder:",tif) LV_Add("","IP address:",a_ipaddress1) LV_Add("","Desktop Width:",a_screenwidth) LV_Add("","Desktop Height:",a_screenheight) LV_Add("","All drives:",list) LV_Add("","Selected drive:",folder) LV_Add("","Drive type:",type) LV_Add("","Drive Status:",status) LV_Add("","Total capacity (MB):",cap) LV_Add("","Free space (MB):",free) LV_Add("","File system:",fs) LV_Add("","Volume label:",label) LV_Add("","Serial number:",serial) LV_Add("","Memory load (in %):",stats1) LV_Add("","Total physical Ram:",stats2) LV_Add("","Available physical Ram:",stats3) LV_Add("","Total Pagefile:",stats4) LV_Add("","Available Pagefile:",stats5) LV_Add("","Total Virtual:",stats6) LV_Add("","Available Virtual:",stats7) LV_ModifyCol(1,"130") LV_ModifyCol(2,"Autohdr") Gui,add,button,x10 w110 grunit,Registry Run items Gui,add,button,x130 yp w100 ginsw,Installed Software Gui,add,button,x360 yp w50,E&xit Gui,show return MemGetStats() ; code posted by antonyb { VarSetCapacity(memorystatus, 4+4+4+4+4+4+4+4) success := DllCall("kernel32.dll\GlobalMemoryStatus", "uint", &memorystatus) stats := ReadInteger(&memorystatus,4,4, false) ; Memory Load (Percentage of memory in use) stats := stats "|" Round(ReadInteger(&memorystatus,8,4, false)/1024) ; Total Physical Ram stats := stats "|" Round(ReadInteger(&memorystatus,12,4, false)/1024) ; Available Physical Ram stats := stats "|" Round(ReadInteger(&memorystatus,16,4, false)/1024) ; Total Pagefile stats := stats "|" Round(ReadInteger(&memorystatus,20,4, false)/1024) ; Available Pagefile stats := stats "|" Round(ReadInteger(&memorystatus,24,4, false)/1024) ; Total Virtual stats := stats "|" Round(ReadInteger(&memorystatus,28,4, false)/1024) ; Available Virtual return stats } ReadInteger( p_address, p_offset, p_size, p_hex=true ) { value = 0 old_FormatInteger := a_FormatInteger if ( p_hex ) SetFormat, integer, hex else SetFormat, integer, dec loop, %p_size% value := value+( *( ( p_address+p_offset )+( a_Index-1 ) ) << ( 8* ( a_Index-1 ) ) ) SetFormat, integer, %old_FormatInteger% return, value } runit: ;get Run entries from registry fileappend,HKLM\Software\Microsoft\Windows\CurrentVersion\Run`n`n,run items.txt Loop,HKLM, Software\Microsoft\Windows\CurrentVersion\Run,1,1 { RegRead, RegValue if ErrorLevel <> 0 return fileappend,Name = %A_LoopRegName%`nValue = %RegValue%`n`n,run items.txt } return insw: ;get installed software fileappend,HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall`n`t~~~~~~~~~~`n`n,installed software.txt Loop, HKLM, SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, 1, 1 { if a_loopregname = DisplayName { regread,regvalue fileappend, %A_LoopRegSubKey%`nDisplayName = %RegValue%`n`n, installed software.txt } } return GuiClose: ButtonExit: ExitApp