Daftar Hardware Scan Status Komputer Client

grid.TextMatrix0, 2 = Tgl Scan grid.TextMatrix0, 3 = Jam Scan grid.TextMatrix0, 4 = Prosesor grid.TextMatrix0, 5 = Prosesor Scan grid.TextMatrix0, 6 = Speed grid.TextMatrix0, 7 = Speed Scan grid.TextMatrix0, 8 = RAM grid.TextMatrix0, 9 = RAM Scan grid.TextMatrix0, 10 = Harddisk grid.TextMatrix0, 11 = Harddisk Scan grid.TextMatrix0, 12 = VGA grid.TextMatrix0, 13 = VGA Scan grid.Refresh lblJamScan = FormatTime, HH:MM Timer4.Enabled = True End Sub Private Sub Timer2_Timer List1.Clear Dim dom As IADsDomain Dim comp As IADsComputer Set dom = GetObjectWinNT: server dom.Filter = ArrayComputer For Each comp In dom If Not UCasecomp.Name = SERVER00 Then List1.AddItem comp.Name End If Next Timer2.Enabled = False End Sub Private Sub Timer3_Timer Call load_service End Sub Private Sub Timer4_Timer If FormatNow, HH:MM = txtJam.Text Or FormatNow, HH:MM_ = txtJam1.Text Then Me.Caption = Scanning hardware client ............. Call ScanHW Else Me.Caption = Menu Utama End If Timer4.Enabled = False End Sub

2. Daftar Hardware

Private Sub cmdInfoHW_Click frmScanHW.Show End Sub Private Sub cmdKeluar_Click Me.Hide Unload Me frmMenu.Show End Sub Private Sub cmdKom_Click frmStatusKom.Show Universitas Sumatera Utara End Sub Private Sub cmdScanVGA_Click frmScanVGA.Show End Sub Private Sub Form_UnloadCancel As Integer Me.Hide Unload Me frmMenu.Show End Sub

3. Scan Status Komputer Client

Public system_mon As String Public service_mon As String Public sp As String Public mon As Boolean Private Const INFINITE = HFFFF Private Declare Function WaitForSingleObject Lib kernel32 ByVal hHandle As Long, ByVal dwMilliseconds As Long As Long Private Declare Function OpenProcess Lib kernel32 ByVal dwAccess As Long, ByVal fInherit As Integer, ByVal hObject As Long As Long Private Declare Function ShowWindow Lib user32 ByVal hwnd As Long, ByVal nCmdShow As Integer As Integer Private Declare Function GetWindow Lib user32 ByVal hwnd As Long, ByVal wCmd As Integer As Integer Const RSP_SIMPLE_SERVICE = 1 Const RSP_UNREGISTER_SERVICE = 0 Private Declare Function GetCurrentProcessId Lib kernel32 As Long Private Declare Function RegisterServiceProcess Lib kernel32 ByVal dwProcessID As Long, ByVal dwType As Long As Long Dim rsUpdate As Recordset Public Sub load_service Dim wmilocator As New WbemScripting.SWbemLocator Dim wmiService As WbemScripting.SWbemServices List1.Clear On Error GoTo err2 Set wmiService = GetObjectwinmgmts:\\ cmb_computer _ \root\cimv2 Set running1 = wmiService.ExecQuerySELECT FROM_ Win32_Process Dim fnd As Boolean Dim i As Integer Dim seti As Boolean Dim bolBaca As Boolean fnd = False i = 0 seti = 0 For Each objSWbemObject In running1 List1.AddItem objSWbemObject.Name If bolBaca = False Then If objSWbemObject.Name = explorer.exe Then Label3.Caption = cmb_computer On strStatus = 1 bolBaca = True ElseIf objSWbemObject.Name = userinit.exe Then Label3.Caption = cmb_computer On strStatus = 1 Universitas Sumatera Utara bolBaca = True ElseIf objSWbemObject.Name = LanmanServer Then Label3.Caption = cmb_computer On strStatus = 1 bolBaca = True Else Label3.Caption = End If Set rsUpdate = New ADODB.Recordset rsUpdate.Open Update hw set status=1 where kom= cmb_computer.Text , CN, 1, 2 End If Next Exit Sub err2: MsgBox koneksi gagal ..., vbCritical + vbOKOnly, Err.Number End Sub Public Sub load_computer Dim dom As IADsDomain Dim comp As IADsComputer Set dom = GetObjectWinNT: server dom.Filter = ArrayComputer For Each comp In dom On Error Resume Next If Not UCasecomp.Name = SERVER00 Then cmb_computer.AddItem comp.Name End If Next End Sub Private Sub cmb_computer_Click load_service End Sub Private Sub cmdKeluar_Click Me.Hide Unload Me End Sub Private Sub Form_Load cmb_computer.Clear Call Koneksi load_computer End Sub

4. Scan Prosesor, RAM dan Harddisk