Skrip Posted July 4, 2006 Author Posted July 4, 2006 "Erm" can be the start of a sentance if you are not sure of something. I was refering to the code above my post. Thanks for telling me how to fix it. [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
Xenobiologist Posted July 4, 2006 Posted July 4, 2006 Firestorm said: I'll get back to work on adding more things to it when I get back to my computer (tommorow) i'm out of town at the moment. I'll take a look at your win-information thing soon, and i'll google siw.exe EDIT:::Google-d and i think you are right about that one, or maybe something like PC-Wizard.EDIT AGAIN:::I don't see it in your sig, is it the bottem one?Hi,I'm curious about what you can add. I meant WinGetSerial and PcInfo. Maybe you'll some things to add.Good luck!So long,Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
Grisu Posted July 5, 2006 Posted July 5, 2006 Hi, I was reading through it and was thinking that the following may be an idea to add: - txt file output in tab or comma delimeted form in particular folder (then a script can be written to pull back all those files and then import them into either a spreadsheet or db). - gathering of all installed programs (software audit purposes) - gathering of pertinant system information e.g. serial numbers from bios (useful for Dell machines as example). - a reduced executable would be awesome that a user could launch that shows them IP, PC-Name, status of network (up/down) etc. like bginfo from sysinternals does, however, it is always present and the user can't just use it when prompted by a support specialist.... Just some thoughts...
Skrip Posted July 5, 2006 Author Posted July 5, 2006 Nice thoughts, I have no clue how to do some of it though, I'll read it again when I get back to my home computer. [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
Skrip Posted July 6, 2006 Author Posted July 6, 2006 th.meger said: Hi, I'm curious about what you can add. I meant WinGetSerial and PcInfo. Maybe you'll some things to add. Good luck! So long, Mega I added the WinGetSerial script into my program if that's okay with you. I got an error in the PcInfo though. C:\AutoIt3\Windows Info.au3 (329) : ==> Variable must be of type "Object".: $colDrives = $objFSO.Drives $colDrives = $objFSO^ ERROR [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
Xenobiologist Posted July 6, 2006 Posted July 6, 2006 (edited) Firestorm said: I added the WinGetSerial script into my program if that's okay with you. I got an error in the PcInfo though. C:\AutoIt3\Windows Info.au3 (329) : ==> Variable must be of type "Object".: $colDrives = $objFSO.Drives $colDrives = $objFSO^ ERROR Hi Firestorm. no problem. I don't get that error. I use Win XP and SP1. I do not maintain the script anymore, but maybe I should implement an ObjError-handler. If do not get 9 / 10 files you might have to change this lines. If $CmdLine[0] > 0 And $CmdLine[1] = "folderTree" Then Sleep(40000) ; give the system time to complete all the commands Else Sleep(20000) EndIf So long, Mega Edited July 6, 2006 by th.meger Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
Skrip Posted July 6, 2006 Author Posted July 6, 2006 New version...See first post. [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
Xenobiologist Posted July 7, 2006 Posted July 7, 2006 Firestorm said: New version...See first post.HI,very nice. But you habe to implement, #cs #ce, or delete my fake progress bar func, otherwise it errors out. I'd like to see some tabs, because then you can increase the readability. Some Label are just too small like the Hardware, FullPath, Office (if Office 2003) maybe some more.You can use $SS_SUNKEN to make the label look better.Go on, otherwise I'll do it So long,Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
Skrip Posted July 7, 2006 Author Posted July 7, 2006 I was also thinking of useing tabs, but I have no clue how to use them I'll check the help file again. [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
Skrip Posted July 7, 2006 Author Posted July 7, 2006 (edited) fixed I think. expandcollapse popup#region Start-up Vars ProgressOn("Loading...", "Gathering Data...", "0%", -1, -1) Global $SelectAll = 0 Dim $Key = "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall" ProgressSet(10, "10%") Dim $Title = "Display Uninstall" Dim $EnableList = 1 Dim $RemoteComputer $SelectedCount = 0 ProgressSet(20, "20%") HotKeySet("{Esc}", "Stop") HotKeySet('^a', 'SelectAll') AutoItSetOption("RunErrorsFatal", 0) $vid_card = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\0000", "DriverDesc") ProgressSet(25, "25%") $processer = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E966-E325-11CE-BFC1-08002BE10318}\0000", "DriverDesc") ProgressSet(30, "30%") $sound_card = Regread("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{71A27CDD-812A-11D0-BEC7-08002BE2092F}\0000", "DriverDesc") ProgressSet(40, "40%") Dim $Bin = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "DigitalProductID") Dim $key4RegisteredOwner = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" ProgressSet(45, "45%") $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") $colSettings = $objWMIService.ExecQuery ("Select * from Win32_OperatingSystem") $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") ProgressSet(50, "50%") $colMemory = $objWMIService.ExecQuery ("Select * from Win32_ComputerSystem") $colCPU = $objWMIService.ExecQuery ("Select * from CIM_Processor") ProgressSet(60, "60%") ;~ $colVideoinfo = $objWMIService.ExecQuery ("Select * from Win32_VideoController") Dim $pcinfo, $pcinfo2, $clockspeed Dim $ffcase = 0 Dim $labelinc = 0 Dim $spy1 = 0 For $object In $colSettings $wininfo = String($object.Caption) $winsp = String($object.CSDVersion) ;~ $clockspeed = String(Int(Number($object.CurrentClockSpeed))) / 1000 Next ProgressSet(70, "70%") For $object In $colCPU $pcinfo = String($object.Name) $clockspeed = String(Int(Number($object.CurrentClockSpeed))) / 1000 Next For $object In $colMemory $primaryowner = String($object.PrimaryOwnerName) $pcinfo2 = String(Int(Number($object.TotalPhysicalMemory) / (1024))) & " KB" & " (" & String(Int(Number($object.TotalPhysicalMemory) / (1024 * 1024)) + 1) & " MB)" Next $audiocardquery = $objWMIService.ExecQuery ("Select * from Win32_SoundDevice") ProgressSet(80, "80%") $cpu = StringFormat("%.2f", $clockspeed) Dim $audiocardinfo,$devices For $object In $audiocardquery $devices = String($object.DeviceID) ProgressSet(90, "90%") $firstaudiocard = $objWMIService.ExecQuery ("Select * from Win32_SoundDevice.DeviceID=" & $devices) $audiocardinfo = String($object.Name) $audiocardinfo2 = String($object.Status) ProgressSet(100, "100%") ConsoleWrite(@CRLF & $audiocardinfo & @CRLF) ProgressOff() Next #endregion Start-up Vars #region Main Script #include <File.au3> #include <Constants.au3> #include <GuiStatusBar.au3> #include <GUIConstants.au3> #include <GuiListView.au3> $mainWindows = GUICreate("Computer Details", 495 + 350, 700, -1, -1) $label_1 = GUICtrlCreateLabel("Computer Name: ", 24, 8, 86, 17) $Label_2 = GUICtrlCreateLabel(@ComputerName, 112, 8, 150, 17) $ID = GUICtrlCreateLabel("UserName: " & @UserName, 200, 8, 155, 17) $Group_8 = GUICtrlCreateGroup("Operating System", 176, 64, 127, 41) $Label_9 = GUICtrlCreateLabel(@OSVersion, 192, 80, 110, 17) $Group2 = GUICtrlCreateGroup("Monitor", 24, 56, 145, 121) $Label_4 = GUICtrlCreateLabel("Width: " & @DesktopWidth & " Pixels", 40, 72, 120, 17) $Label_5 = GUICtrlCreateLabel("Height: " & @DesktopHeight & " Pixels", 40, 96, 120, 17) $Label_6 = GUICtrlCreateLabel("Refresh Rate: " & @DesktopRefresh & " Pixels", 40, 120, 120, 17) $label_11 = GUICtrlCreateLabel("Depth: " & @DesktopDepth & " Pixels", 40, 140, 120, 17) $Label_14 = GUICtrlCreateLabel("The Full Path for this Program is: ", 24, 32, 159, 17) $Label_14 = GUICtrlCreateLabel(@ScriptFullPath, 184, 36, 300, 17, $SS_SUNKEN) $Group3 = GUICtrlCreateGroup("Internet", 24, 184, 281, 73) $retest_c = GUICtrlCreateButton("Retest", 32, 200, 97, 25) $Internet = GUICtrlCreateLabel("Testing Internet Connection...", 32, 232, 250, 17) $Label_7 = GUICtrlCreateLabel("IP:" & @IPAddress1, 150, 205, 150, 17, $SS_SUNKEN) $Group4 = GUICtrlCreateGroup("Drives", 24, 264, 233, 169) $Button_11 = GUICtrlCreateButton("Find All Drives", 32, 280, 121, 25) $Button_12 = GUICtrlCreateButton("Find CD-Drives", 32, 312, 121, 25) $Button_13 = GUICtrlCreateButton("Find Removable Drives", 32, 344, 121, 25) $Button_15 = GUICtrlCreateButton("Get Size of Drive:", 32, 376, 121, 25) $cd_o = GUICtrlCreateButton("Open Drive", 168, 280, 73, 25) $Label_10 = GUICtrlCreateLabel("Home Drive:" & @HomeDrive, 160, 320, 80, 17) $Credits = GUICtrlCreateButton("Credits", 420, 10, 65, 25) $Group5 = GUICtrlCreateGroup("Windows", 264, 264, 225, 169) $winCombo_C = GUICtrlCreateCombo("", 272, 280, 209, 21) $winClose_R = GUICtrlCreateRadio("Win Close", 272, 328, 73, 17) $winKill_R = GUICtrlCreateRadio("Win Kill", 360, 328, 65, 17) $winshow_R = GUICtrlCreateRadio("Win Show", 272, 304, 73, 17) $winhide_R = GUICtrlCreateRadio("Win Hide", 360, 304, 65, 17) $Go_B = GUICtrlCreateButton("Activate", 272, 376, 209, 25) $status_L = GUICtrlCreateLabel("Ready...", 272, 408, 210, 17) $GroupP = GUICtrlCreateGroup("Programs", 312, 156, 177, 101) $processClose_R = GUICtrlCreateRadio("Process End", 320, 212, 161, 17) $Go_A = GUICtrlCreateButton("Activate...", 320, 232, 161, 20) $processCombo_C = GUICtrlCreateCombo("", 320, 180, 161, 21) $tree = GuiCtrlCreateButton("Folder Tree", 355, 10, 65, 25) $r_input = GUICtrlCreateInput("Enter program to run", 174, 117, 130, 20) $rp_input = GUICtrlCreateInput("Enter path to program", 174, 137, 130, 20) $rr_run = GUICtrlCreateButton("Run program", 174, 157, 130, 20) $hard_group = GUICtrlCreateGroup("Hard Ware", 310, 50, 180, 100) $vid_card_L = GUICtrlCreateLabel("Vid Card: " & $vid_card, 315, 66, 174, 20) ;~ $processer_L = GUICtrlCreateLabel("Processor: " & $processer, 315, 86, 174, 20) GUICtrlCreateLabel("Processer: " & $pcinfo, 315, 86, 174, 30) ;~ $sound_car_L = GUICtrlCreateLabel("Sound Card: " & $sound_card, 315, 116, 174, 20) GUICtrlCreateLabel("Sound Card: " & $audiocardinfo & " Status: " & $audiocardinfo2, 315, 116, 174, 30) ;Windows Info $microsoft_info = GUICtrlCreateGroup("Microsoft Information", 24, 445, 450, 220) $status_L = GUICtrlCreateLabel("Information read out ...", 27, 475, 400, 20) $description_L = GUICtrlCreateLabel("Description-----------------------------------", 27, 495, 103, 20) $windowsType_L = GUICtrlCreateLabel("WindowsType------------------------------------", 27, 515, 103, 20) $serialNumber_L = GUICtrlCreateLabel("SerialNumber-----------------------------------", 27, 535, 103, 20) $ProductKey_L = GUICtrlCreateLabel("ProductKey-------------------------------------", 27, 555, 103, 20) $InstallDate_L = GUICtrlCreateLabel("InstallDate--------------------------------", 27, 575, 103, 20) $LastBootUpTime_L = GUICtrlCreateLabel("LastBootUpTime------------------------------", 27, 595, 103, 20) $RegisteredOwner_L = GUICtrlCreateLabel("RegisteredOwner--------------------------------", 27, 615, 103, 20) $officeKey_L = GUICtrlCreateLabel("OfficeKey----------------------------------", 27, 635, 113, 20) $description_I = GUICtrlCreateInput("Description", 135, 495, 315, 21) $windowsType_I = GUICtrlCreateInput("WindowsType", 135, 515, 315, 21) $serialNumber_I = GUICtrlCreateInput("SerialNumber", 135, 535, 315, 21) $ProductKey_I = GUICtrlCreateInput("ProductKey", 135, 555, 315, 21) $InstallDate_I = GUICtrlCreateInput("InstallDate", 135, 575, 315, 21) $LastBootUpTime_I = GUICtrlCreateInput("LastBootUpTime", 135, 595, 315, 21) $RegisteredOwner_I = GUICtrlCreateInput("RegisteredOwner", 135, 615, 315, 21) $officeKey_I = GUICtrlCreateInput("OfficeKey", 135, 635, 315, 21) ;Installed Programs List $ulist = GUICtrlCreateListView("Icon|Display Name|Key Name", 510, 40, 285, 520, BitOR($LVS_NOSORTHEADER, $LVS_REPORT, $LVS_SHOWSELALWAYS), BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES, $LVS_EX_SUBITEMIMAGES)) GUICtrlSetResizing($ulist, $GUI_DOCKBORDERS) _GUICtrlListViewSetColumnWidth ($ulist, 0, $LVSCW_AUTOSIZE_USEHEADER) _GUICtrlListViewSetColumnWidth ($ulist, 1, 310) _GUICtrlListViewSetColumnWidth ($ulist, 2, 310) $but1 = GUICtrlCreateButton("Refresh List", 520, 15, -1, -1, $BS_DEFPUSHBUTTON) GUICtrlSetResizing($but1, $GUI_DOCKALL) $but2 = GUICtrlCreateButton("Uninstall Programs", 600, 15) GUICtrlSetResizing($but2, $GUI_DOCKALL) GUICtrlSetState($but2, $GUI_DISABLE) $chkbox = GUICtrlCreateCheckbox("Enable\Disable Silent Uninstall", 9000, 12) GUICtrlSetResizing($chkbox, $GUI_DOCKALL) $Label1 = GUICtrlCreateLabel('Remote Computer', 4700, 15, 85, 20) GUICtrlSetResizing($Label1, $GUI_DOCKALL) $Input1 = GUICtrlCreateInput('', 5600, 12, 130, 20, BitOR($ES_LEFT, $ES_AUTOHSCROLL, $ES_UPPERCASE)) GUICtrlSetResizing($Input1, $GUI_DOCKALL) $StatusBar1 = _GuiCtrlStatusBarCreate ($mainWindows, 400, "", $SBT_TOOLTIPS) _GuiCtrlStatusBarSetMinHeight ($StatusBar1, 15) $Progress1 = GUICtrlCreateProgress(510, 575, 285, 20) GUICtrlSetResizing($Progress1, $GUI_DOCKSTATEBAR) GUICtrlSetState(-1, $GUI_HIDE) GUISetState(@SW_SHOW) $List = ReadKeys() GuiSetState() _INITIATE() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_11 $pass = 1 $dr_all = DriveGetDrive("all") If @error Then Msgbox(0, "ERROR", "No Drives found.") $pass = 0 EndIf If $pass = 1 Then If NOT @error Then MsgBox(4096,"", "Found " & $dr_all[0] & " drives") For $i = 1 to $dr_all[0] MsgBox(4096,"Drive " & $i, $dr_all[$i]) Next EndIf EndIf Case $msg = $Button_12 $pass = 1 $dr_cd = DriveGetDrive("CDROM") If @error Then Msgbox(0, "ERROR", "No CDROM Drives found.") $pass = 0 EndIf If $pass = 1 Then If NOT @error Then MsgBox(4096,"", "Found " & $dr_cd[0] & " drives") For $i = 1 to $dr_cd[0] MsgBox(4096,"Drive " & $i, $dr_cd[$i]) Next EndIf EndIf Case $msg = $Button_13 $pass = 1 $dr_removable = DriveGetDrive("REMOVABLE") If @error Then Msgbox(0, "ERROR", "No Removable Drives found.") $pass = 0 EndIf If $pass = 1 Then If NOT @error Then MsgBox(4096,"", "Found " & $dr_removable[0] & " drives") For $i = 1 to $dr_removable[0] MsgBox(4096,"Drive " & $i, $dr_removable[$i]) Next EndIf EndIf Case $msg = $Button_15 $SD = InputBox("Selection", "Please Enter the drive path that you want the size of.", "C:\") $SDI = DriveSpaceTotal($SD) $SDI2 = DriveSpaceFree($SD) If Not @error Then MsgBox(0, "Drive Space for Drive: " & $SD, "Drive total space: " & Round($SDI/ 1024, 2) & " MegaBytes") MsgBox(0, "Drive Free Space for Drive: " & $SD, "Drive free space: " & Round($SDI2/ 1024, 2) & " MegaBytes") EndIf If @error Then MsgBox(0, "ERROR: DRIVE NOT FOUND!!!", "---That is an invalid drive path, please enter correct path!!!---") EndIf Case $msg = $Go_B If GUICtrlRead($winClose_R) = $GUI_CHECKED Then _winClose() If GUICtrlRead($winKill_R) = $GUI_CHECKED Then _winKill() If GUICtrlRead($winshow_R) = $GUI_CHECKED Then _winshow() If GUICtrlRead($winhide_R) = $GUI_CHECKED Then _winhide() Case $msg = $processClose_R _processCombo() Case $msg = $winKill_R Or $msg = $winClose_R _winListCombo() Case $msg = $cd_o $o = InputBox("Open", "Please enter the Drive you want to open. If it is a CD drive the disk will eject", "C:\") CDTray($o, "OPEN") If @error = 0 Then Run('Explorer.exe "' & $o & '"', @WorkingDir, @SW_SHOW) EndIf Case $msg = $retest_c GuiCtrlSetData($Internet, GetToggle3r(GuiCtrlRead($Internet))) _Internet() Case $msg = $Credits MsgBox(0, "Credits", "This program was made by Firestorm.") MsgBox(0, "Q/C", "Questions? Comments? Errors? E-mail me at firestorm037@hotmail.com!") Case $msg = $tree $Path = FileSelectFolder("Choose a folder.", "") Run('Explorer.exe "' & $Path & '"', @WorkingDir, @SW_SHOW) Case $msg = $Go_A If GuiCtrlRead($processClose_R) = $GUI_CHECKED Then _processClose() Case $msg = $rr_run $program = GUICtrlRead($r_input) $program_path = GUICtrlRead($rp_input) Run($program & ".exe", $program_path) If @error = 1 Then MsgBox(48, "ERROR", "That is an invailid file or file path.") EndIf Case $MSG = $but1 _GUICtrlListViewDeleteAllItems ($ulist) $RemoteComputer = StringReplace(GUICtrlRead($Input1), '\', '') $List = ReadKeys($RemoteComputer) GUICtrlSetData($Input1, '') Case $MSG = $but2 $ListIndices = _GUICtrlListViewGetSelectedIndices ($ulist, 1) If $ListIndices == $LV_ERR Then ContinueLoop If $ListIndices[0] > 1 Then GUICtrlSetState($Progress1, $GUI_SHOW) Opt('RunErrorsFatal', 0) $Count = 0 ControlListView('', '', $ulist, "SelectClear") For $x = $ListIndices[0] To 1 Step - 1 $Count += 1 $SelectKey = '' GUICtrlSetData($Progress1, Int(($Count / $ListIndices[0]) * 100)) $ListInfo = StringSplit($List[$ListIndices[$x]], '|');ListInfo[0] = 5, ListInfo[1] = Display Name, ListInfo[2] = Regkey Name, ListInfo[3] = Icon, ListInfo[4] = QuietUninstallString, ListInfo[5] = UnistallString If GUICtrlRead($chkbox) == $GUI_CHECKED Or $RemoteComputer <> '' Then $SelectKey = $ListInfo[4] If $SelectKey == '' Then $SelectKey = StringReplace($ListInfo[5], '/i', '/X', 1) & ' /qn /norestart' _GuiCtrlStatusBarSetText ($StatusBar1, ' Uninstalling Program ' & $Count & ' Of ' & $ListIndices[0] & ' ' & $ListInfo[1]) EndIf If GUICtrlRead($chkbox) == $GUI_UNCHECKED And $SelectKey == '' Then $SelectKey = $ListInfo[5] _GuiCtrlStatusBarSetText ($StatusBar1, ' Uninstalling Program ' & $Count & ' Of ' & $ListIndices[0] & ' ' & $ListInfo[1]) EndIf If $RemoteComputer == '' Then $Pid = Run($SelectKey, @WorkingDir, @SW_SHOW) Else $Pid = Run('BeyondExec.exe ' & StringMid($RemoteComputer, 1, StringInStr($RemoteComputer, '\', 0, -1) - 1) & ' -s -n -r ' & $SelectKey, @WorkingDir, @SW_HIDE) EndIf If @error Then _FileWriteLog(@ScriptDir & '\UninstallFail.Log', $ListInfo[1] & ' | ' & $SelectKey) EndIf If Not @error And $RemoteComputer <> "" Then GUISetCursor(15, 1);set cursor to wait While ProcessExists($Pid) Sleep(50) WEnd GUISetCursor(2, 1);set cursor to arrow ;ProcessWaitClose($Pid) SetError(0) RegRead($RemoteComputer & $Key & "\" & $ListInfo[2], 'UninstallString') If @error == 1 Then _GUICtrlListViewDeleteItem ($ulist, $ListIndices[$x]) _ArrayDelete($List, $ListIndices[$x]) EndIf Next ;$Pos = WinGetPos($Title) ;_GUICtrlListViewScroll($ulist, 0, Number('-' & $Pos[3] * 20)) Opt('RunErrorsFatal', 1) GUICtrlSetData($Progress1, 0) If $ListIndices[0] > 1 Then GUICtrlSetState($Progress1, $GUI_HIDE) If $RemoteComputer == '' Then _GuiCtrlStatusBarSetText ($StatusBar1, ' Local Computer: ' & _GUICtrlListViewGetItemCount ($ulist) & ' Objects, ' & _GUICtrlListViewGetSelectedCount ($ulist) & ' Objects Selected') Else _GuiCtrlStatusBarSetText ($StatusBar1, ' Remote Computer: ' & '"' & StringReplace($RemoteComputer, '\', '') & '"' & ', ' & _GUICtrlListViewGetItemCount ($ulist) & ' Objects, ' _ & _GUICtrlListViewGetSelectedCount ($ulist) & ' Objects Selected') EndIf GUICtrlSetState($but2, $GUI_DISABLE) Case $MSG = $GUI_EVENT_CLOSE Exit ; resize columns based on window size Case $MSG = $GUI_EVENT_MINIMIZE $width = ControlGetPos($mainWindows, "", $ulist) $Resize = $width[2] - _GUICtrlListViewGetColumnWidth ($ulist, 0) _GUICtrlListViewSetColumnWidth ($ulist, 1, $Resize / 2.1) _GUICtrlListViewSetColumnWidth ($ulist, 2, $Resize / 2.1) _GuiCtrlStatusBarResize ($StatusBar1) Case $MSG = $GUI_EVENT_MAXIMIZE $width = ControlGetPos($mainWindows, "", $ulist) $Resize = $width[2] - _GUICtrlListViewGetColumnWidth ($ulist, 0) _GUICtrlListViewSetColumnWidth ($ulist, 1, $Resize / 2.1) _GUICtrlListViewSetColumnWidth ($ulist, 2, $Resize / 2.1) _GuiCtrlStatusBarResize ($StatusBar1) Case $MSG = $GUI_EVENT_RESIZED $width = ControlGetPos($mainWindows, "", $ulist) $Resize = $width[2] - _GUICtrlListViewGetColumnWidth ($ulist, 0) _GUICtrlListViewSetColumnWidth ($ulist, 1, $Resize / 2.1) _GUICtrlListViewSetColumnWidth ($ulist, 2, $Resize / 2.1) _GuiCtrlStatusBarResize ($StatusBar1) Case $MSG = $GUI_EVENT_RESTORE $width = ControlGetPos($mainWindows, "", $ulist) $Resize = $width[2] - _GUICtrlListViewGetColumnWidth ($ulist, 0) _GUICtrlListViewSetColumnWidth ($ulist, 1, $Resize / 2.1) _GUICtrlListViewSetColumnWidth ($ulist, 2, $Resize / 2.1) _GuiCtrlStatusBarResize ($StatusBar1) Case Else If $EnableList And $SelectedCount == 1 Then $EnableList = 0 GUICtrlSetState($but2, $GUI_ENABLE);enable uninstall button EndIf If Not $EnableList And $SelectedCount == 0 Then $EnableList = 1 GUICtrlSetState($but2, $GUI_DISABLE);disable uninstall button EndIf If $SelectedCount <> _GUICtrlListViewGetSelectedCount ($ulist) Then $SelectedCount = _GUICtrlListViewGetSelectedCount ($ulist) If $RemoteComputer == '' Then _GuiCtrlStatusBarSetText ($StatusBar1, ' Local Computer: ' & _GUICtrlListViewGetItemCount ($ulist) & ' Objects, ' & _GUICtrlListViewGetSelectedCount ($ulist) & ' Objects Selected') Else _GuiCtrlStatusBarSetText ($StatusBar1, ' Remote Computer: ' & '"' & StringReplace($RemoteComputer, '\', '') & '"' & ', ' & _GUICtrlListViewGetItemCount ($ulist) & ' Objects, ' _ & _GUICtrlListViewGetSelectedCount ($ulist) & ' Objects Selected') EndIf EndIf EndSelect WEnd Exit #endregion Main Script #region Functions Func _INITIATE() $product = "XP" _processCombo() _winListCombo() _Internet() For $objOperatingSystem In $colSettings Next GUICtrlSetData($description_I, StringMid($objOperatingSystem.Description, 1)) GUICtrlSetData($windowsType_I, '(' & @OSVersion & ') ' & StringMid($objOperatingSystem.Caption, 19)) GUICtrlSetData($serialNumber_I, StringMid($objOperatingSystem.SerialNumber, 1)) GUICtrlSetData($ProductKey_I, DecodeProductKey($Bin)) GUICtrlSetData($InstallDate_I, WMIDateStringToDate($objOperatingSystem.InstallDate)) GUICtrlSetData($LastBootUpTime_I, WMIDateStringToDate($objOperatingSystem.LastBootUpTime)) GUICtrlSetData($RegisteredOwner_I, RegRead($key4RegisteredOwner, "RegisteredOwner")) GUICtrlSetData($officeKey_I, getOfficeKey()) GUICtrlSetData($officeKey_L, "Office " & $product & "-------------------") EndFunc Func _winClose() If WinExists(GUICtrlRead($winCombo_C)) Then WinClose(GUICtrlRead($winCombo_C)) Else GUICtrlSetData($status_L, "Window doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_winClose Func _winKill() If WinExists(GUICtrlRead($winCombo_C)) Then WinKill(GUICtrlRead($winCombo_C)) Else GUICtrlSetData($status_L, "Window doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_winKill Func _processClose() If ProcessExists(GUICtrlRead($processCombo_C)) Then ProcessClose(GUICtrlRead($processCombo_C)) Else GUICtrlSetData($status_L, "Process doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_processClose ;~ Func _killByPID() ;~ If _ProcessGetName(GUICtrlRead($processCombo_C)) <> '' Then ;~ $rc = _RunDOS("start taskkill /PID " & GUICtrlRead($processCombo_C) & " /T") ;~ GUICtrlSetData($status_L, "ProcessID " & GUICtrlRead($processCombo_C) & " - (" & _ProcessGetName(GUICtrlRead($processCombo_C)) & ")" & " killed") ;~ Sleep(2500) ;~ GUICtrlSetData($status_L, "Ready...") ;~ Else ;~ GUICtrlSetData($status_L, "ProcessID doesn't exist") ;~ Sleep(2500) ;~ GUICtrlSetData($status_L, "Ready...") ;~ EndIf ;~ EndFunc;==>_killByPID Func _processCombo() Dim $processArray = ProcessList() For $i = 1 To $processArray[0][0] GUICtrlSetData($processCombo_C, $processArray[$i][0]) Next EndFunc;==>_processCombo Func _winListCombo() Dim $windowArray = WinList() For $i = 1 To $windowArray[0][0] ; Only display visble windows that have a title If $windowArray[$i][0] <> "" Then;AND IsVisible($var[$i][1]) Then GUICtrlSetData($winCombo_C, $windowArray[$i][0]) EndIf Next EndFunc;==>_winListCombo Func _winshow() If WinExists(GUICtrlRead($winCombo_C)) Then WinSetState(GUICtrlRead($winCombo_C),"", @SW_SHOW) Else GUICtrlSetData($status_L, "Window doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_winshow Func _winhide() If WinExists(GUICtrlRead($winCombo_C)) Then WinSetState(GUICtrlRead($winCombo_C),"", @SW_HIDE) Else GUICtrlSetData($status_L, "Window doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_winhide Func _Internet() Local $sInputBoxAnswer = InputBox("Test Connection","Do you want to test your internet connection?" & @CRLF & _ "You may get a firewall warning dialog warning this will only ping the website you specify to test your connection.","www.yahoo.com") If @Error = 0 Then;The Okay button was pushed Sleep(500) $var = Ping($sInputBoxAnswer) If $var Then; also possible: If @error = 0 Then ... GuiCtrlSetData($Internet, GetToggle1(GuiCtrlRead($Internet))) Else GuiCtrlSetData($Internet, GetToggle2(GuiCtrlRead($Internet))) EndIf ElseIf @Error = 1 Then;The Cancel button was pushed GuiCtrlSetData($Internet, 'Internet Connection Test canceled') ElseIf @Error = 3 Then;error GuiCtrlSetData($Internet, 'Internet Connection Test an error has occured') EndIf EndFunc Func GetToggle1($stext) if $stext = "Testing Internet Connection..." then GUICtrlSetColor($Internet, "0x0000ff") return "You are connected to the internet!" else return " " endif EndFunc Func GetToggle2($stext) if $stext = "Testing Internet Connection..." then GUICtrlSetColor($Internet, "0xff0000") return "WARNING! You are NOT connected to the internet!" else return " " endif EndFunc Func GetToggle3r($stext) if $stext = "WARNING! You are NOT connected to the internet!" OR "You are connected to the internet!" then GUICtrlSetColor($Internet, "0x000000") return "Testing Internet Connection..." else return " " endif EndFunc ; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.1 beta ; Author: Unknown & Thorsten Meger ; ; Script Function: Decode REG_BINARY ; ---------------------------------------------------------------------------- Func DecodeProductKey($BinaryDPID) Local $bKey[15] Local $sKey[29] Local $Digits[24] Local $Value = 0 Local $hi = 0 Local $n = 0 Local $i = 0 Local $dlen = 29 Local $slen = 15 Local $Result $Digits = StringSplit("BCDFGHJKMPQRTVWXY2346789", "") $BinaryDPID = StringMid($BinaryDPID, 105, 30) For $i = 1 To 29 Step 2 $bKey[Int($i / 2) ] = Dec(StringMid($BinaryDPID, $i, 2)) Next For $i = $dlen - 1 To 0 Step - 1 If Mod(($i + 1), 6) = 0 Then $sKey[$i] = "-" Else $hi = 0 For $n = $slen - 1 To 0 Step - 1 $Value = BitOR(BitShift($hi, -8), $bKey[$n]) $bKey[$n] = Int($Value / 24) $hi = Mod($Value, 24) Next $sKey[$i] = $Digits[$hi + 1] EndIf Next For $i = 0 To 28 $Result = $Result & $sKey[$i] Next Return $Result EndFunc ;==>DecodeProductKey ; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.1 beta ; Author: Unknown & Thorsten Meger <Thorsten.Meger@gmx.de> ; ; Script Function: WMIDateStringToDate (changed Date format) ; ---------------------------------------------------------------------------- Func WMIDateStringToDate($dtmDate) Return (StringMid($dtmDate, 7, 2) & "/" & _ StringMid($dtmDate, 5, 2) & "/" & StringLeft($dtmDate, 4) _ & " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate, 13, 2)) EndFunc ;==>WMIDateStringToDate ; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.1 beta ; Author: Thorsten Meger <Thorsten.Meger@gmx.de> ; ; Script Function: Display a "fake" progressbar at the beginning ; ---------------------------------------------------------------------------- Func progress() If $counter = 3 Then For $i = 0 To 20 Step 1 GUICtrlSetData($progressbar, $i) Sleep($wait / 20) Next ElseIf $counter = 2 Then For $i = 20 To 50 Step 1 GUICtrlSetData($progressbar, $i) Sleep($wait / 30) Next ElseIf $counter = 1 Then For $i = 50 To 80 Step 1 GUICtrlSetData($progressbar, $i) Sleep($wait / 30) Next ElseIf $counter = 0 Then For $i = 80 To 100 Step 1 GUICtrlSetData($progressbar, $i) Sleep($wait / 20) Next GUICtrlSetState($progressbar, $GUI_HIDE) EndIf EndFunc ;==>progress ; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.1 beta ; Author: Thorsten Meger <Thorsten.Meger@gmx.de> ; ; Script Function:Get & decode OfficeKey ; ---------------------------------------------------------------------------- Func getOfficeKey() Local $List[1] Local $i = 1 $var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Common\InstallRoot", "Path") If $var <> "" Then $product = "2003" Dim $officeKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Registration" Else $var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\10.0\Common\InstallRoot", "Path") If @error <> 0 Then GUICtrlSetData($status_L, "Info: Unable to find installationPath, maybe no Office installed!") Return "No Office XP or 2003 found" EndIf If $var <> "" Then $product = "XP" Dim $officeKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\10.0\Registration" EndIf EndIf Dim $var = RegEnumKey($officeKey, $i) If @error <> 0 Then GUICtrlSetData($status_L, "Info: Unable to find REG_BINARY 'DigitalProductID', maybe no Office installed!") Return "No Office XP or 2003 found" Else $List[$i - 1] = RegRead($officeKey & "\" & $var, "DigitalProductID") If $List[$i - 1] = "" Then GUICtrlSetData($status_L, "Info: Unable to find REG_BINARY 'DigitalProductID', maybe no Office installed!") Else $key = $List[$i - 1] Return DecodeProductKey($key) EndIf EndIf EndFunc ;==>getOfficeKey Func ReadKeys($s_RemoteComputer = '') _GuiCtrlStatusBarSetText ($StatusBar1, ' Reading Registry Keys, Please Wait....') GUISetCursor(15, 1);set cursor to wait Local $even = 1 Local $Count = 1 Dim $avArray[1] If $s_RemoteComputer <> '' Then If StringMid($s_RemoteComputer, 1, 1) <> '\' Or StringMid($s_RemoteComputer, 2, 1) <> '\' Or StringRight($s_RemoteComputer, 1) <> '\' Then $s_RemoteComputer = '\\' & StringReplace($s_RemoteComputer, '\', '') & '\' EndIf EndIf Local Const $regkey = $s_RemoteComputer & 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall' While 1 $skey = RegEnumKey($regkey, $Count) If @error <> 0 Then ExitLoop $line = RegRead($regkey & '\' & $skey, 'Displayname') $line = StringReplace($line, ' (remove only)', '') If $line == '' Then $line = "No Display Name" $SilentUnistall = RegRead($regkey & '\' & $skey, 'QuietUninstallString') $Unistall = RegRead($regkey & '\' & $skey, 'UninstallString') $Icon = RegRead($regkey & '\' & $skey, 'DisplayIcon') $Icon = StringReplace(StringMid($Icon, 1, StringInStr($Icon, ',') - 1), '"', '') If $Icon = "" Then $Icon = "SHELL32.DLL" If $SilentUnistall <> '' Or $Unistall <> '' Then If (GUICtrlRead($chkbox) == $GUI_CHECKED And $SilentUnistall <> '') Or ($s_RemoteComputer <> '' And $SilentUnistall <> '') Then $avArray[UBound($avArray) - 1] = $line & '|' & $skey & '|' & $Icon & '|' & $SilentUnistall & '|' ReDim $avArray[UBound($avArray) + 1] ElseIf ($s_RemoteComputer == '' And GUICtrlRead($chkbox) == $GUI_UNCHECKED) Or (GUICtrlRead($chkbox) == $GUI_CHECKED And StringInStr($Unistall, 'msiexec.exe')) Or ($s_RemoteComputer <> '' And StringInStr($Unistall, 'msiexec.exe')) Then $avArray[UBound($avArray) - 1] = $line & '|' & $skey & '|' & $Icon & '|' & $SilentUnistall & '|' & $Unistall ReDim $avArray[UBound($avArray) + 1] EndIf EndIf $Count += 1 WEnd If (UBound($avArray) - 1) == 0 Then If $RemoteComputer == '' Then _GuiCtrlStatusBarSetText ($StatusBar1, ' Local Computer: ' & _GUICtrlListViewGetItemCount ($ulist) & ' Objects, ' & _GUICtrlListViewGetSelectedCount ($ulist) & ' Objects Selected') If $RemoteComputer <> '' And _GUICtrlListViewGetItemCount ($ulist) Then _GuiCtrlStatusBarSetText ($StatusBar1, ' Remote Computer: ' & '"' & StringReplace($RemoteComputer, '\', '') & '"' & ', ' & _GUICtrlListViewGetItemCount ($ulist) & ' Objects, ' _ & _GUICtrlListViewGetSelectedCount ($ulist) & ' Objects Selected') $RemoteComputer = '\\' & $RemoteComputer & '\' ElseIf $RemoteComputer <> '' And _GUICtrlListViewGetItemCount ($ulist) == 0 Then _GuiCtrlStatusBarSetText ($StatusBar1, ' Could Not Connect To Remote Computer ' & '"' & StringReplace($RemoteComputer, '\', '') & '"') $RemoteComputer = '' EndIf Else ReDim $avArray[UBound($avArray) - 1] _ArraySort($avArray) GUICtrlSetState($Progress1, $GUI_SHOW) For $i = 0 To UBound($avArray) - 1 GUICtrlSetData($Progress1, Int(($i / (UBound($avArray) - 1)) * 100)) $Item = StringSplit($avArray[$i], '|') Local $lv_item = GUICtrlCreateListViewItem("" & "|" & $Item[1] & "|" & $Item[2], $ulist) GUICtrlSetImage(-1, $Item[3]) If $even Then $even = 0 GUICtrlSetBkColor($lv_item, 0x5CACEE) Else GUICtrlSetBkColor($lv_item, 0x9FB6CD) $even = 1 EndIf Sleep(15) Next Sleep(1000) If $RemoteComputer == '' Then _GuiCtrlStatusBarSetText ($StatusBar1, ' Local Computer: ' & _GUICtrlListViewGetItemCount ($ulist) & ' Objects, ' & _GUICtrlListViewGetSelectedCount ($ulist) & ' Objects Selected') If $RemoteComputer <> '' And _GUICtrlListViewGetItemCount ($ulist) Then _GuiCtrlStatusBarSetText ($StatusBar1, ' Remote Computer: ' & '"' & StringReplace($RemoteComputer, '\', '') & '"' & ', ' & _GUICtrlListViewGetItemCount ($ulist) & ' Objects, ' _ & _GUICtrlListViewGetSelectedCount ($ulist) & ' Objects Selected') $RemoteComputer = '\\' & $RemoteComputer & '\' ElseIf $RemoteComputer <> '' And _GUICtrlListViewGetItemCount ($ulist) == 0 Then _GuiCtrlStatusBarSetText ($StatusBar1, ' Could Not Connect To Remote Computer ' & '"' & StringReplace($RemoteComputer, '\', '') & '"') $RemoteComputer = '' EndIf EndIf GUICtrlSetState($Progress1, $GUI_HIDE) GUISetCursor(2, 1);set cursor to arrow Return ($avArray) EndFunc;==>ReadKeys Func SelectAll() If $SelectAll Then $SelectAll = 0 GUICtrlSetState($but2, $GUI_DISABLE) Else $SelectAll = 1 GUICtrlSetState($but2, $GUI_ENABLE) EndIf _GUICtrlListViewSetItemSelState ($ulist, -1, $SelectAll) EndFunc;==>SelectAll Func Stop();exit the gui Exit EndFunc;==>Stop #endregion Functions Edited August 21, 2013 by Melba23 Removed email address [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
marfdaman Posted July 8, 2006 Posted July 8, 2006 Starts off with some errors because of undeclared variables, $counter, $progressbar and $wait, but other than that, it's a fine program, a lot of useful info. Oh, why not make the listview with installed programs a bit larger by the way (longer mostly). Nice work Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Skrip Posted July 8, 2006 Author Posted July 8, 2006 Yes, I know. But the program still works When you say longer do you mean <--> or ^ | V [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
marfdaman Posted July 8, 2006 Posted July 8, 2006 (edited) I mean mainly ^, but it could be with a bit more <--> as well IMHO | V Edit: why won't that work for me with the spaces Edited July 8, 2006 by marfdaman Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Skrip Posted July 8, 2006 Author Posted July 8, 2006 Okay [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
Skrip Posted July 8, 2006 Author Posted July 8, 2006 (edited) expandcollapse popup#region Start-up Vars ProgressOn("Loading...", "Gathering Data...", "0%", -1, -1) Global $SelectAll = 0 Dim $Key = "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall" ProgressSet(10, "10%") Dim $Title = "Display Uninstall" Dim $EnableList = 1 Dim $RemoteComputer $SelectedCount = 0 ProgressSet(20, "20%") HotKeySet("{Esc}", "Stop") HotKeySet('^a', 'SelectAll') AutoItSetOption("RunErrorsFatal", 0) $vid_card = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\0004", "DriverDesc") If @error Then $vid_card = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\0000", "DriverDesc") EndIf ProgressSet(25, "25%") $processer = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E966-E325-11CE-BFC1-08002BE10318}\0000", "DriverDesc") ProgressSet(30, "30%") $sound_card = Regread("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{71A27CDD-812A-11D0-BEC7-08002BE2092F}\0000", "DriverDesc") ProgressSet(40, "40%") Dim $Bin = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "DigitalProductID") Dim $key4RegisteredOwner = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" ProgressSet(45, "45%") $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") $colSettings = $objWMIService.ExecQuery ("Select * from Win32_OperatingSystem") $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") ProgressSet(50, "50%") $colMemory = $objWMIService.ExecQuery ("Select * from Win32_ComputerSystem") $colCPU = $objWMIService.ExecQuery ("Select * from CIM_Processor") ProgressSet(60, "60%") ;~ $colVideoinfo = $objWMIService.ExecQuery ("Select * from Win32_VideoController") Dim $pcinfo, $pcinfo2, $clockspeed Dim $ffcase = 0 Dim $labelinc = 0 Dim $spy1 = 0 For $object In $colSettings $wininfo = String($object.Caption) $winsp = String($object.CSDVersion) ;~ $clockspeed = String(Int(Number($object.CurrentClockSpeed))) / 1000 Next ProgressSet(70, "70%") For $object In $colCPU $pcinfo = String($object.Name) $clockspeed = String(Int(Number($object.CurrentClockSpeed))) / 1000 Next For $object In $colMemory $primaryowner = String($object.PrimaryOwnerName) $pcinfo2 = String(Int(Number($object.TotalPhysicalMemory) / (1024))) & " KB" & " (" & String(Int(Number($object.TotalPhysicalMemory) / (1024 * 1024)) + 1) & " MB)" Next $audiocardquery = $objWMIService.ExecQuery ("Select * from Win32_SoundDevice") ProgressSet(80, "80%") $cpu = StringFormat("%.2f", $clockspeed) Dim $audiocardinfo,$devices For $object In $audiocardquery $devices = String($object.DeviceID) ProgressSet(90, "90%") $firstaudiocard = $objWMIService.ExecQuery ("Select * from Win32_SoundDevice.DeviceID=" & $devices) $audiocardinfo = String($object.Name) $audiocardinfo2 = String($object.Status) ProgressSet(100, "100%") ConsoleWrite(@CRLF & $audiocardinfo & @CRLF) ProgressOff() Next #endregion Start-up Vars #region Main Script #include <File.au3> #include <Constants.au3> #include <GuiStatusBar.au3> #include <GUIConstants.au3> #include <GuiListView.au3> $mainWindows = GUICreate("Computer Details", 495 + 350, 700, -1, -1) $label_1 = GUICtrlCreateLabel("Computer Name: ", 24, 8, 86, 17) $Label_2 = GUICtrlCreateLabel(@ComputerName, 112, 8, 150, 17) $ID = GUICtrlCreateLabel("UserName: " & @UserName, 200, 8, 155, 17) $Group_8 = GUICtrlCreateGroup("Operating System", 176, 64, 127, 41) $Label_9 = GUICtrlCreateLabel(@OSVersion, 192, 80, 110, 17) $Group2 = GUICtrlCreateGroup("Monitor", 24, 56, 145, 121) $Label_4 = GUICtrlCreateLabel("Width: " & @DesktopWidth & " Pixels", 40, 72, 120, 17) $Label_5 = GUICtrlCreateLabel("Height: " & @DesktopHeight & " Pixels", 40, 96, 120, 17) $Label_6 = GUICtrlCreateLabel("Refresh Rate: " & @DesktopRefresh & " Pixels", 40, 120, 120, 17) $label_11 = GUICtrlCreateLabel("Depth: " & @DesktopDepth & " Pixels", 40, 140, 120, 17) $Label_14 = GUICtrlCreateLabel("The Full Path for this Program is: ", 24, 32, 159, 17) $Label_14 = GUICtrlCreateLabel(@ScriptFullPath, 184, 36, 300, 17, $SS_SUNKEN) $Group3 = GUICtrlCreateGroup("Internet", 24, 184, 281, 73) $retest_c = GUICtrlCreateButton("Retest", 32, 200, 97, 25) $Internet = GUICtrlCreateLabel("Testing Internet Connection...", 32, 232, 250, 17) $Label_7 = GUICtrlCreateLabel("IP:" & @IPAddress1, 150, 205, 150, 17, $SS_SUNKEN) $Group4 = GUICtrlCreateGroup("Drives", 24, 264, 233, 169) $Button_11 = GUICtrlCreateButton("Find All Drives", 32, 280, 121, 25) $Button_12 = GUICtrlCreateButton("Find CD-Drives", 32, 312, 121, 25) $Button_13 = GUICtrlCreateButton("Find Removable Drives", 32, 344, 121, 25) $Button_15 = GUICtrlCreateButton("Get Size of Drive:", 32, 376, 121, 25) $cd_o = GUICtrlCreateButton("Open Drive", 168, 280, 73, 25) $Label_10 = GUICtrlCreateLabel("Home Drive:" & @HomeDrive, 160, 320, 80, 17) $Credits = GUICtrlCreateButton("Credits", 420, 10, 65, 25) $Group5 = GUICtrlCreateGroup("Windows", 264, 264, 225, 169) $winCombo_C = GUICtrlCreateCombo("", 272, 280, 209, 21) $winClose_R = GUICtrlCreateRadio("Win Close", 272, 328, 73, 17) $winKill_R = GUICtrlCreateRadio("Win Kill", 360, 328, 65, 17) $winshow_R = GUICtrlCreateRadio("Win Show", 272, 304, 73, 17) $winhide_R = GUICtrlCreateRadio("Win Hide", 360, 304, 65, 17) $Go_B = GUICtrlCreateButton("Activate", 272, 376, 209, 25) $status_L = GUICtrlCreateLabel("Ready...", 272, 408, 210, 17) $GroupP = GUICtrlCreateGroup("Programs", 312, 156, 177, 101) $processClose_R = GUICtrlCreateRadio("Process End", 320, 212, 161, 17) $Go_A = GUICtrlCreateButton("Activate...", 320, 232, 161, 20) $processCombo_C = GUICtrlCreateCombo("", 320, 180, 161, 21) $tree = GuiCtrlCreateButton("Folder Tree", 355, 10, 65, 25) $r_input = GUICtrlCreateInput("Enter program to run", 174, 117, 130, 20) $rp_input = GUICtrlCreateInput("Enter path to program", 174, 137, 130, 20) $rr_run = GUICtrlCreateButton("Run program", 174, 157, 130, 20) $hard_group = GUICtrlCreateGroup("Hard Ware", 310, 50, 196, 100) $vid_card_L = GUICtrlCreateLabel("Vid Card: " & $vid_card, 315, 66, 190, 20) ;~ $processer_L = GUICtrlCreateLabel("Processor: " & $processer, 315, 86, 174, 20) GUICtrlCreateLabel("Processer: " & $pcinfo, 315, 86, 174, 30) ;~ $sound_car_L = GUICtrlCreateLabel("Sound Card: " & $sound_card, 315, 116, 174, 20) GUICtrlCreateLabel("Sound Card: " & $audiocardinfo & " Status: " & $audiocardinfo2, 315, 116, 174, 30) ;Windows Info $microsoft_info = GUICtrlCreateGroup("Microsoft Information", 24, 445, 450, 220) $status_L = GUICtrlCreateLabel("Information read out ...", 27, 475, 400, 20) $description_L = GUICtrlCreateLabel("Description-----------------------------------", 27, 495, 103, 20) $windowsType_L = GUICtrlCreateLabel("WindowsType------------------------------------", 27, 515, 103, 20) $serialNumber_L = GUICtrlCreateLabel("SerialNumber-----------------------------------", 27, 535, 103, 20) $ProductKey_L = GUICtrlCreateLabel("ProductKey-------------------------------------", 27, 555, 103, 20) $InstallDate_L = GUICtrlCreateLabel("InstallDate--------------------------------", 27, 575, 103, 20) $LastBootUpTime_L = GUICtrlCreateLabel("LastBootUpTime------------------------------", 27, 595, 103, 20) $RegisteredOwner_L = GUICtrlCreateLabel("RegisteredOwner--------------------------------", 27, 615, 103, 20) $officeKey_L = GUICtrlCreateLabel("OfficeKey----------------------------------", 27, 635, 113, 20) $description_I = GUICtrlCreateInput("Description", 135, 495, 315, 21) $windowsType_I = GUICtrlCreateInput("WindowsType", 135, 515, 315, 21) $serialNumber_I = GUICtrlCreateInput("SerialNumber", 135, 535, 315, 21) $ProductKey_I = GUICtrlCreateInput("ProductKey", 135, 555, 315, 21) $InstallDate_I = GUICtrlCreateInput("InstallDate", 135, 575, 315, 21) $LastBootUpTime_I = GUICtrlCreateInput("LastBootUpTime", 135, 595, 315, 21) $RegisteredOwner_I = GUICtrlCreateInput("RegisteredOwner", 135, 615, 315, 21) $officeKey_I = GUICtrlCreateInput("OfficeKey", 135, 635, 315, 21) ;Trans-=-Alpha $trans = GUICtrlCreateSlider(510, 620, 300, 30) GUICtrlSetLimit($trans, 255,50) $transbutton = GUICtrlCreateButton("Set window alpha", 510, 590, 300, 20) ;Installed Programs List $ulist = GUICtrlCreateListView("Icon|Display Name|Key Name", 510, 40, 285, 520, BitOR($LVS_NOSORTHEADER, $LVS_REPORT, $LVS_SHOWSELALWAYS), BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES, $LVS_EX_SUBITEMIMAGES)) GUICtrlSetResizing($ulist, $GUI_DOCKBORDERS) _GUICtrlListViewSetColumnWidth ($ulist, 0, $LVSCW_AUTOSIZE_USEHEADER) _GUICtrlListViewSetColumnWidth ($ulist, 1, 310) _GUICtrlListViewSetColumnWidth ($ulist, 2, 310) $but1 = GUICtrlCreateButton("Refresh List", 520, 15, -1, -1, $BS_DEFPUSHBUTTON) GUICtrlSetResizing($but1, $GUI_DOCKALL) $but2 = GUICtrlCreateButton("Uninstall Programs", 600, 15) GUICtrlSetResizing($but2, $GUI_DOCKALL) GUICtrlSetState($but2, $GUI_DISABLE) $chkbox = GUICtrlCreateCheckbox("Enable\Disable Silent Uninstall", 9000, 12) GUICtrlSetResizing($chkbox, $GUI_DOCKALL) $Label1 = GUICtrlCreateLabel('Remote Computer', 4700, 15, 85, 20) GUICtrlSetResizing($Label1, $GUI_DOCKALL) $Input1 = GUICtrlCreateInput('', 5600, 12, 130, 20, BitOR($ES_LEFT, $ES_AUTOHSCROLL, $ES_UPPERCASE)) GUICtrlSetResizing($Input1, $GUI_DOCKALL) $StatusBar1 = _GuiCtrlStatusBarCreate ($mainWindows, 400, "", $SBT_TOOLTIPS) _GuiCtrlStatusBarSetMinHeight ($StatusBar1, 15) $Progress1 = GUICtrlCreateProgress(510, 560, 285, 20) GUICtrlSetResizing($Progress1, $GUI_DOCKSTATEBAR) GUICtrlSetState(-1, $GUI_HIDE) GUISetState(@SW_SHOW) $List = ReadKeys() GuiSetState() _INITIATE() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $transbutton $var2 = GUICtrlRead($trans) WinSetTrans("Computer Details", "", $var2) MsgBox(0,$var2, "The Window alpha is now: " & $var2) Case $msg = $Button_11 $pass = 1 $dr_all = DriveGetDrive("all") If @error Then Msgbox(0, "ERROR", "No Drives found.") $pass = 0 EndIf If $pass = 1 Then If NOT @error Then MsgBox(4096,"", "Found " & $dr_all[0] & " drives") For $i = 1 to $dr_all[0] MsgBox(4096,"Drive " & $i, $dr_all[$i]) Next EndIf EndIf Case $msg = $Button_12 $pass = 1 $dr_cd = DriveGetDrive("CDROM") If @error Then Msgbox(0, "ERROR", "No CDROM Drives found.") $pass = 0 EndIf If $pass = 1 Then If NOT @error Then MsgBox(4096,"", "Found " & $dr_cd[0] & " drives") For $i = 1 to $dr_cd[0] MsgBox(4096,"Drive " & $i, $dr_cd[$i]) Next EndIf EndIf Case $msg = $Button_13 $pass = 1 $dr_removable = DriveGetDrive("REMOVABLE") If @error Then Msgbox(0, "ERROR", "No Removable Drives found.") $pass = 0 EndIf If $pass = 1 Then If NOT @error Then MsgBox(4096,"", "Found " & $dr_removable[0] & " drives") For $i = 1 to $dr_removable[0] MsgBox(4096,"Drive " & $i, $dr_removable[$i]) Next EndIf EndIf Case $msg = $Button_15 $SD = InputBox("Selection", "Please Enter the drive path that you want the size of.", "C:\") $SDI = DriveSpaceTotal($SD) $SDI2 = DriveSpaceFree($SD) If Not @error Then MsgBox(0, "Drive Space for Drive: " & $SD, "Drive total space: " & Round($SDI/ 1024, 2) & " MegaBytes") MsgBox(0, "Drive Free Space for Drive: " & $SD, "Drive free space: " & Round($SDI2/ 1024, 2) & " MegaBytes") EndIf If @error Then MsgBox(0, "ERROR: DRIVE NOT FOUND!!!", "---That is an invalid drive path, please enter correct path!!!---") EndIf Case $msg = $Go_B If GUICtrlRead($winClose_R) = $GUI_CHECKED Then _winClose() If GUICtrlRead($winKill_R) = $GUI_CHECKED Then _winKill() If GUICtrlRead($winshow_R) = $GUI_CHECKED Then _winshow() If GUICtrlRead($winhide_R) = $GUI_CHECKED Then _winhide() Case $msg = $processClose_R _processCombo() Case $msg = $winKill_R Or $msg = $winClose_R _winListCombo() Case $msg = $cd_o $o = InputBox("Open", "Please enter the Drive you want to open. If it is a CD drive the disk will eject", "C:\") CDTray($o, "OPEN") If @error = 0 Then Run('Explorer.exe "' & $o & '"', @WorkingDir, @SW_SHOW) EndIf Case $msg = $retest_c GuiCtrlSetData($Internet, GetToggle3r(GuiCtrlRead($Internet))) _Internet() Case $msg = $Credits MsgBox(0, "Credits", "This program was made by Firestorm.") MsgBox(0, "Q/C", "Questions? Comments? Errors? E-mail me at firestorm037@hotmail.com!") Case $msg = $tree $Path = FileSelectFolder("Choose a folder.", "") Run('Explorer.exe "' & $Path & '"', @WorkingDir, @SW_SHOW) Case $msg = $Go_A If GuiCtrlRead($processClose_R) = $GUI_CHECKED Then _processClose() Case $msg = $rr_run $program = GUICtrlRead($r_input) $program_path = GUICtrlRead($rp_input) Run($program & ".exe", $program_path) If @error = 1 Then MsgBox(48, "ERROR", "That is an invailid file or file path.") EndIf Case $MSG = $but1 _GUICtrlListViewDeleteAllItems ($ulist) $RemoteComputer = StringReplace(GUICtrlRead($Input1), '\', '') $List = ReadKeys($RemoteComputer) GUICtrlSetData($Input1, '') Case $MSG = $but2 $ListIndices = _GUICtrlListViewGetSelectedIndices ($ulist, 1) If $ListIndices == $LV_ERR Then ContinueLoop If $ListIndices[0] > 1 Then GUICtrlSetState($Progress1, $GUI_SHOW) Opt('RunErrorsFatal', 0) $Count = 0 ControlListView('', '', $ulist, "SelectClear") For $x = $ListIndices[0] To 1 Step - 1 $Count += 1 $SelectKey = '' GUICtrlSetData($Progress1, Int(($Count / $ListIndices[0]) * 100)) $ListInfo = StringSplit($List[$ListIndices[$x]], '|');ListInfo[0] = 5, ListInfo[1] = Display Name, ListInfo[2] = Regkey Name, ListInfo[3] = Icon, ListInfo[4] = QuietUninstallString, ListInfo[5] = UnistallString If GUICtrlRead($chkbox) == $GUI_CHECKED Or $RemoteComputer <> '' Then $SelectKey = $ListInfo[4] If $SelectKey == '' Then $SelectKey = StringReplace($ListInfo[5], '/i', '/X', 1) & ' /qn /norestart' _GuiCtrlStatusBarSetText ($StatusBar1, ' Uninstalling Program ' & $Count & ' Of ' & $ListIndices[0] & ' ' & $ListInfo[1]) EndIf If GUICtrlRead($chkbox) == $GUI_UNCHECKED And $SelectKey == '' Then $SelectKey = $ListInfo[5] _GuiCtrlStatusBarSetText ($StatusBar1, ' Uninstalling Program ' & $Count & ' Of ' & $ListIndices[0] & ' ' & $ListInfo[1]) EndIf If $RemoteComputer == '' Then $Pid = Run($SelectKey, @WorkingDir, @SW_SHOW) Else $Pid = Run('BeyondExec.exe ' & StringMid($RemoteComputer, 1, StringInStr($RemoteComputer, '\', 0, -1) - 1) & ' -s -n -r ' & $SelectKey, @WorkingDir, @SW_HIDE) EndIf If @error Then _FileWriteLog(@ScriptDir & '\UninstallFail.Log', $ListInfo[1] & ' | ' & $SelectKey) EndIf If Not @error And $RemoteComputer <> "" Then GUISetCursor(15, 1);set cursor to wait While ProcessExists($Pid) Sleep(50) WEnd GUISetCursor(2, 1);set cursor to arrow ;ProcessWaitClose($Pid) SetError(0) RegRead($RemoteComputer & $Key & "\" & $ListInfo[2], 'UninstallString') If @error == 1 Then _GUICtrlListViewDeleteItem ($ulist, $ListIndices[$x]) _ArrayDelete($List, $ListIndices[$x]) EndIf Next ;$Pos = WinGetPos($Title) ;_GUICtrlListViewScroll($ulist, 0, Number('-' & $Pos[3] * 20)) Opt('RunErrorsFatal', 1) GUICtrlSetData($Progress1, 0) If $ListIndices[0] > 1 Then GUICtrlSetState($Progress1, $GUI_HIDE) If $RemoteComputer == '' Then _GuiCtrlStatusBarSetText ($StatusBar1, ' Local Computer: ' & _GUICtrlListViewGetItemCount ($ulist) & ' Objects, ' & _GUICtrlListViewGetSelectedCount ($ulist) & ' Objects Selected') Else _GuiCtrlStatusBarSetText ($StatusBar1, ' Remote Computer: ' & '"' & StringReplace($RemoteComputer, '\', '') & '"' & ', ' & _GUICtrlListViewGetItemCount ($ulist) & ' Objects, ' _ & _GUICtrlListViewGetSelectedCount ($ulist) & ' Objects Selected') EndIf GUICtrlSetState($but2, $GUI_DISABLE) Case $MSG = $GUI_EVENT_CLOSE Exit ; resize columns based on window size Case $MSG = $GUI_EVENT_MINIMIZE $width = ControlGetPos($mainWindows, "", $ulist) $Resize = $width[2] - _GUICtrlListViewGetColumnWidth ($ulist, 0) _GUICtrlListViewSetColumnWidth ($ulist, 1, $Resize / 2.1) _GUICtrlListViewSetColumnWidth ($ulist, 2, $Resize / 2.1) _GuiCtrlStatusBarResize ($StatusBar1) Case $MSG = $GUI_EVENT_MAXIMIZE $width = ControlGetPos($mainWindows, "", $ulist) $Resize = $width[2] - _GUICtrlListViewGetColumnWidth ($ulist, 0) _GUICtrlListViewSetColumnWidth ($ulist, 1, $Resize / 2.1) _GUICtrlListViewSetColumnWidth ($ulist, 2, $Resize / 2.1) _GuiCtrlStatusBarResize ($StatusBar1) Case $MSG = $GUI_EVENT_RESIZED $width = ControlGetPos($mainWindows, "", $ulist) $Resize = $width[2] - _GUICtrlListViewGetColumnWidth ($ulist, 0) _GUICtrlListViewSetColumnWidth ($ulist, 1, $Resize / 2.1) _GUICtrlListViewSetColumnWidth ($ulist, 2, $Resize / 2.1) _GuiCtrlStatusBarResize ($StatusBar1) Case $MSG = $GUI_EVENT_RESTORE $width = ControlGetPos($mainWindows, "", $ulist) $Resize = $width[2] - _GUICtrlListViewGetColumnWidth ($ulist, 0) _GUICtrlListViewSetColumnWidth ($ulist, 1, $Resize / 2.1) _GUICtrlListViewSetColumnWidth ($ulist, 2, $Resize / 2.1) _GuiCtrlStatusBarResize ($StatusBar1) Case Else If $EnableList And $SelectedCount == 1 Then $EnableList = 0 GUICtrlSetState($but2, $GUI_ENABLE);enable uninstall button EndIf If Not $EnableList And $SelectedCount == 0 Then $EnableList = 1 GUICtrlSetState($but2, $GUI_DISABLE);disable uninstall button EndIf If $SelectedCount <> _GUICtrlListViewGetSelectedCount ($ulist) Then $SelectedCount = _GUICtrlListViewGetSelectedCount ($ulist) If $RemoteComputer == '' Then _GuiCtrlStatusBarSetText ($StatusBar1, ' Local Computer: ' & _GUICtrlListViewGetItemCount ($ulist) & ' Objects, ' & _GUICtrlListViewGetSelectedCount ($ulist) & ' Objects Selected') Else _GuiCtrlStatusBarSetText ($StatusBar1, ' Remote Computer: ' & '"' & StringReplace($RemoteComputer, '\', '') & '"' & ', ' & _GUICtrlListViewGetItemCount ($ulist) & ' Objects, ' _ & _GUICtrlListViewGetSelectedCount ($ulist) & ' Objects Selected') EndIf EndIf EndSelect WEnd Exit #endregion Main Script #region Functions Func _INITIATE() GUICtrlSetData($trans,255) $product = "XP" _processCombo() _winListCombo() _Internet() For $objOperatingSystem In $colSettings Next GUICtrlSetData($description_I, StringMid($objOperatingSystem.Description, 1)) GUICtrlSetData($windowsType_I, '(' & @OSVersion & ') ' & StringMid($objOperatingSystem.Caption, 19)) GUICtrlSetData($serialNumber_I, StringMid($objOperatingSystem.SerialNumber, 1)) GUICtrlSetData($ProductKey_I, DecodeProductKey($Bin)) GUICtrlSetData($InstallDate_I, WMIDateStringToDate($objOperatingSystem.InstallDate)) GUICtrlSetData($LastBootUpTime_I, WMIDateStringToDate($objOperatingSystem.LastBootUpTime)) GUICtrlSetData($RegisteredOwner_I, RegRead($key4RegisteredOwner, "RegisteredOwner")) GUICtrlSetData($officeKey_I, getOfficeKey()) GUICtrlSetData($officeKey_L, "Office " & $product & "-------------------") EndFunc Func _winClose() If WinExists(GUICtrlRead($winCombo_C)) Then WinClose(GUICtrlRead($winCombo_C)) Else GUICtrlSetData($status_L, "Window doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_winClose Func _winKill() If WinExists(GUICtrlRead($winCombo_C)) Then WinKill(GUICtrlRead($winCombo_C)) Else GUICtrlSetData($status_L, "Window doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_winKill Func _processClose() If ProcessExists(GUICtrlRead($processCombo_C)) Then ProcessClose(GUICtrlRead($processCombo_C)) Else GUICtrlSetData($status_L, "Process doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_processClose ;~ Func _killByPID() ;~ If _ProcessGetName(GUICtrlRead($processCombo_C)) <> '' Then ;~ $rc = _RunDOS("start taskkill /PID " & GUICtrlRead($processCombo_C) & " /T") ;~ GUICtrlSetData($status_L, "ProcessID " & GUICtrlRead($processCombo_C) & " - (" & _ProcessGetName(GUICtrlRead($processCombo_C)) & ")" & " killed") ;~ Sleep(2500) ;~ GUICtrlSetData($status_L, "Ready...") ;~ Else ;~ GUICtrlSetData($status_L, "ProcessID doesn't exist") ;~ Sleep(2500) ;~ GUICtrlSetData($status_L, "Ready...") ;~ EndIf ;~ EndFunc;==>_killByPID Func _processCombo() Dim $processArray = ProcessList() For $i = 1 To $processArray[0][0] GUICtrlSetData($processCombo_C, $processArray[$i][0]) Next EndFunc;==>_processCombo Func _winListCombo() Dim $windowArray = WinList() For $i = 1 To $windowArray[0][0] ; Only display visble windows that have a title If $windowArray[$i][0] <> "" Then;AND IsVisible($var[$i][1]) Then GUICtrlSetData($winCombo_C, $windowArray[$i][0]) EndIf Next EndFunc;==>_winListCombo Func _winshow() If WinExists(GUICtrlRead($winCombo_C)) Then WinSetState(GUICtrlRead($winCombo_C),"", @SW_SHOW) Else GUICtrlSetData($status_L, "Window doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_winshow Func _winhide() If WinExists(GUICtrlRead($winCombo_C)) Then WinSetState(GUICtrlRead($winCombo_C),"", @SW_HIDE) Else GUICtrlSetData($status_L, "Window doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_winhide Func _Internet() Local $sInputBoxAnswer = InputBox("Test Connection","Do you want to test your internet connection?" & @CRLF & _ "You may get a firewall warning dialog warning this will only ping the website you specify to test your connection.","www.yahoo.com") If @Error = 0 Then;The Okay button was pushed Sleep(500) $var = Ping($sInputBoxAnswer) If $var Then; also possible: If @error = 0 Then ... GuiCtrlSetData($Internet, GetToggle1(GuiCtrlRead($Internet))) Else GuiCtrlSetData($Internet, GetToggle2(GuiCtrlRead($Internet))) EndIf ElseIf @Error = 1 Then;The Cancel button was pushed GuiCtrlSetData($Internet, 'Internet Connection Test canceled') ElseIf @Error = 3 Then;error GuiCtrlSetData($Internet, 'Internet Connection Test an error has occured') EndIf EndFunc Func GetToggle1($stext) if $stext = "Testing Internet Connection..." then GUICtrlSetColor($Internet, "0x0000ff") return "You are connected to the internet!" else return " " endif EndFunc Func GetToggle2($stext) if $stext = "Testing Internet Connection..." then GUICtrlSetColor($Internet, "0xff0000") return "WARNING! You are NOT connected to the internet!" else return " " endif EndFunc Func GetToggle3r($stext) if $stext = "WARNING! You are NOT connected to the internet!" OR "You are connected to the internet!" then GUICtrlSetColor($Internet, "0x000000") return "Testing Internet Connection..." else return " " endif EndFunc ; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.1 beta ; Author: Unknown & Thorsten Meger ; ; Script Function: Decode REG_BINARY ; ---------------------------------------------------------------------------- Func DecodeProductKey($BinaryDPID) Local $bKey[15] Local $sKey[29] Local $Digits[24] Local $Value = 0 Local $hi = 0 Local $n = 0 Local $i = 0 Local $dlen = 29 Local $slen = 15 Local $Result $Digits = StringSplit("BCDFGHJKMPQRTVWXY2346789", "") $BinaryDPID = StringMid($BinaryDPID, 105, 30) For $i = 1 To 29 Step 2 $bKey[Int($i / 2) ] = Dec(StringMid($BinaryDPID, $i, 2)) Next For $i = $dlen - 1 To 0 Step - 1 If Mod(($i + 1), 6) = 0 Then $sKey[$i] = "-" Else $hi = 0 For $n = $slen - 1 To 0 Step - 1 $Value = BitOR(BitShift($hi, -8), $bKey[$n]) $bKey[$n] = Int($Value / 24) $hi = Mod($Value, 24) Next $sKey[$i] = $Digits[$hi + 1] EndIf Next For $i = 0 To 28 $Result = $Result & $sKey[$i] Next Return $Result EndFunc ;==>DecodeProductKey ; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.1 beta ; Author: Unknown & Thorsten Meger <Thorsten.Meger@gmx.de> ; ; Script Function: WMIDateStringToDate (changed Date format) ; ---------------------------------------------------------------------------- Func WMIDateStringToDate($dtmDate) Return (StringMid($dtmDate, 7, 2) & "/" & _ StringMid($dtmDate, 5, 2) & "/" & StringLeft($dtmDate, 4) _ & " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate, 13, 2)) EndFunc ;==>WMIDateStringToDate ; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.1 beta ; Author: Thorsten Meger <Thorsten.Meger@gmx.de> ; ; Script Function: Display a "fake" progressbar at the beginning ; ---------------------------------------------------------------------------- Func progress() If $counter = 3 Then For $i = 0 To 20 Step 1 GUICtrlSetData($progressbar, $i) Sleep($wait / 20) Next ElseIf $counter = 2 Then For $i = 20 To 50 Step 1 GUICtrlSetData($progressbar, $i) Sleep($wait / 30) Next ElseIf $counter = 1 Then For $i = 50 To 80 Step 1 GUICtrlSetData($progressbar, $i) Sleep($wait / 30) Next ElseIf $counter = 0 Then For $i = 80 To 100 Step 1 GUICtrlSetData($progressbar, $i) Sleep($wait / 20) Next GUICtrlSetState($progressbar, $GUI_HIDE) EndIf EndFunc ;==>progress ; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.1 beta ; Author: Thorsten Meger <Thorsten.Meger@gmx.de> ; ; Script Function:Get & decode OfficeKey ; ---------------------------------------------------------------------------- Func getOfficeKey() Local $List[1] Local $i = 1 $var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Common\InstallRoot", "Path") If $var <> "" Then $product = "2003" Dim $officeKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Registration" Else $var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\10.0\Common\InstallRoot", "Path") If @error <> 0 Then GUICtrlSetData($status_L, "Info: Unable to find installationPath, maybe no Office installed!") Return "No Office XP or 2003 found" EndIf If $var <> "" Then $product = "XP" Dim $officeKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\10.0\Registration" EndIf EndIf Dim $var = RegEnumKey($officeKey, $i) If @error <> 0 Then GUICtrlSetData($status_L, "Info: Unable to find REG_BINARY 'DigitalProductID', maybe no Office installed!") Return "No Office XP or 2003 found" Else $List[$i - 1] = RegRead($officeKey & "\" & $var, "DigitalProductID") If $List[$i - 1] = "" Then GUICtrlSetData($status_L, "Info: Unable to find REG_BINARY 'DigitalProductID', maybe no Office installed!") Else $key = $List[$i - 1] Return DecodeProductKey($key) EndIf EndIf EndFunc ;==>getOfficeKey Func ReadKeys($s_RemoteComputer = '') _GuiCtrlStatusBarSetText ($StatusBar1, ' Reading Registry Keys, Please Wait....') GUISetCursor(15, 1);set cursor to wait Local $even = 1 Local $Count = 1 Dim $avArray[1] If $s_RemoteComputer <> '' Then If StringMid($s_RemoteComputer, 1, 1) <> '\' Or StringMid($s_RemoteComputer, 2, 1) <> '\' Or StringRight($s_RemoteComputer, 1) <> '\' Then $s_RemoteComputer = '\\' & StringReplace($s_RemoteComputer, '\', '') & '\' EndIf EndIf Local Const $regkey = $s_RemoteComputer & 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall' While 1 $skey = RegEnumKey($regkey, $Count) If @error <> 0 Then ExitLoop $line = RegRead($regkey & '\' & $skey, 'Displayname') $line = StringReplace($line, ' (remove only)', '') If $line == '' Then $line = "No Display Name" $SilentUnistall = RegRead($regkey & '\' & $skey, 'QuietUninstallString') $Unistall = RegRead($regkey & '\' & $skey, 'UninstallString') $Icon = RegRead($regkey & '\' & $skey, 'DisplayIcon') $Icon = StringReplace(StringMid($Icon, 1, StringInStr($Icon, ',') - 1), '"', '') If $Icon = "" Then $Icon = "SHELL32.DLL" If $SilentUnistall <> '' Or $Unistall <> '' Then If (GUICtrlRead($chkbox) == $GUI_CHECKED And $SilentUnistall <> '') Or ($s_RemoteComputer <> '' And $SilentUnistall <> '') Then $avArray[UBound($avArray) - 1] = $line & '|' & $skey & '|' & $Icon & '|' & $SilentUnistall & '|' ReDim $avArray[UBound($avArray) + 1] ElseIf ($s_RemoteComputer == '' And GUICtrlRead($chkbox) == $GUI_UNCHECKED) Or (GUICtrlRead($chkbox) == $GUI_CHECKED And StringInStr($Unistall, 'msiexec.exe')) Or ($s_RemoteComputer <> '' And StringInStr($Unistall, 'msiexec.exe')) Then $avArray[UBound($avArray) - 1] = $line & '|' & $skey & '|' & $Icon & '|' & $SilentUnistall & '|' & $Unistall ReDim $avArray[UBound($avArray) + 1] EndIf EndIf $Count += 1 WEnd If (UBound($avArray) - 1) == 0 Then If $RemoteComputer == '' Then _GuiCtrlStatusBarSetText ($StatusBar1, ' Local Computer: ' & _GUICtrlListViewGetItemCount ($ulist) & ' Objects, ' & _GUICtrlListViewGetSelectedCount ($ulist) & ' Objects Selected') If $RemoteComputer <> '' And _GUICtrlListViewGetItemCount ($ulist) Then _GuiCtrlStatusBarSetText ($StatusBar1, ' Remote Computer: ' & '"' & StringReplace($RemoteComputer, '\', '') & '"' & ', ' & _GUICtrlListViewGetItemCount ($ulist) & ' Objects, ' _ & _GUICtrlListViewGetSelectedCount ($ulist) & ' Objects Selected') $RemoteComputer = '\\' & $RemoteComputer & '\' ElseIf $RemoteComputer <> '' And _GUICtrlListViewGetItemCount ($ulist) == 0 Then _GuiCtrlStatusBarSetText ($StatusBar1, ' Could Not Connect To Remote Computer ' & '"' & StringReplace($RemoteComputer, '\', '') & '"') $RemoteComputer = '' EndIf Else ReDim $avArray[UBound($avArray) - 1] _ArraySort($avArray) GUICtrlSetState($Progress1, $GUI_SHOW) For $i = 0 To UBound($avArray) - 1 GUICtrlSetData($Progress1, Int(($i / (UBound($avArray) - 1)) * 100)) $Item = StringSplit($avArray[$i], '|') Local $lv_item = GUICtrlCreateListViewItem("" & "|" & $Item[1] & "|" & $Item[2], $ulist) GUICtrlSetImage(-1, $Item[3]) If $even Then $even = 0 GUICtrlSetBkColor($lv_item, 0x5CACEE) Else GUICtrlSetBkColor($lv_item, 0x9FB6CD) $even = 1 EndIf Sleep(15) Next Sleep(1000) If $RemoteComputer == '' Then _GuiCtrlStatusBarSetText ($StatusBar1, ' Local Computer: ' & _GUICtrlListViewGetItemCount ($ulist) & ' Objects, ' & _GUICtrlListViewGetSelectedCount ($ulist) & ' Objects Selected') If $RemoteComputer <> '' And _GUICtrlListViewGetItemCount ($ulist) Then _GuiCtrlStatusBarSetText ($StatusBar1, ' Remote Computer: ' & '"' & StringReplace($RemoteComputer, '\', '') & '"' & ', ' & _GUICtrlListViewGetItemCount ($ulist) & ' Objects, ' _ & _GUICtrlListViewGetSelectedCount ($ulist) & ' Objects Selected') $RemoteComputer = '\\' & $RemoteComputer & '\' ElseIf $RemoteComputer <> '' And _GUICtrlListViewGetItemCount ($ulist) == 0 Then _GuiCtrlStatusBarSetText ($StatusBar1, ' Could Not Connect To Remote Computer ' & '"' & StringReplace($RemoteComputer, '\', '') & '"') $RemoteComputer = '' EndIf EndIf GUICtrlSetState($Progress1, $GUI_HIDE) GUISetCursor(2, 1);set cursor to arrow Return ($avArray) EndFunc;==>ReadKeys Func SelectAll() If $SelectAll Then $SelectAll = 0 GUICtrlSetState($but2, $GUI_DISABLE) Else $SelectAll = 1 GUICtrlSetState($but2, $GUI_ENABLE) EndIf _GUICtrlListViewSetItemSelState ($ulist, -1, $SelectAll) EndFunc;==>SelectAll Func Stop();exit the gui Exit EndFunc;==>Stop #endregion FunctionsNew version (Minor Upadte) Quote -Adds Alpha Bar Edited August 21, 2013 by Melba23 Removed email address [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
busysignal Posted July 9, 2006 Posted July 9, 2006 @Firestorm, nice work. Now on the testing it... Cheers..
Skrip Posted July 9, 2006 Author Posted July 9, 2006 Thanks [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
B3TA_SCR1PT3R Posted August 1, 2006 Posted August 1, 2006 other than that I like it! 9.99/10 [right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]
ChrisL Posted August 1, 2006 Posted August 1, 2006 I like it but there is not enough room for the processor and graphics card information [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
JSThePatriot Posted August 1, 2006 Posted August 1, 2006 ChrisL said: I like it but there is not enough room for the processor and graphics card informationThis is an excellent program. I am hoping he is adding my _ComputerGet*Info* UDF's. I will also try to show him how to use tabs effectively.Also _GetIP() is another UDF written by me and modified by a few others long ago. I think it is in inet.au3 (#include <inet.au3>). It would get that Public IP that everyone was wanting.JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now