1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Need help testing a program

Discussion in 'General Software' started by Lillebror, Sep 3, 2009.

  1. Lillebror New Member

    Joined:
    Jul 28, 2007
    Messages:
    719 (0.20/day)
    Thanks Received:
    88
    Location:
    Denmark
    Hey all!

    A few days ago i made a program, that shows some general computer information, by using WMI. Now i just need some computers to test it on! The program is in danish, but if it works just 90% of the time, its gonna get translated to english :)

    http://flumse.dk/test/InfoMe.exe

    [​IMG]

    This is how the main window looks like (also to only window).
    Press the button named "Kør" (that means RUN in English)

    It will then show alot of information (hopefully)

    [​IMG]

    After all the info is in the program, you press the "Clipboard" button - that automaticly copies it to your Clipboard. You can then either just post it in here (please use the CODE tag) or send me a pm with it :)

    Thanks for the help in advance, guys!
     
    10 Year Member at TPU
  2. A Cheese Danish

    A Cheese Danish

    Joined:
    Nov 18, 2006
    Messages:
    2,964 (0.76/day)
    Thanks Received:
    415
    Location:
    your local vending machine
    Code:
    -----------------------------------
    Computer info:
    -----------------------------------
    Producent: DFI Corp,LTD 
    Produkt: LP UT NF4 Expert
    
    -----------------------------------
    Harddisk:
    -----------------------------------
    Model: SAMSUNG HD501LJ
    
    Størelse: 500105249280  <- Dette er i bytes
    
    -----------------------------------
    Harddisk:
    -----------------------------------
    Model: WDC WD6400AACS-00G8B1
    
    Størelse: 640135028736  <- Dette er i bytes
    
    -----------------------------------
    Harddisk:
    -----------------------------------
    Model: WDC WD6400AACS-00G8B1
    
    Størelse: 640135028736  <- Dette er i bytes
    
    -----------------------------------
    Harddisk:
    -----------------------------------
    Model: USB Flash Memory USB Device
    
    Størelse: 254983680  <- Dette er i bytes
    
    -----------------------------------
    Harddisk:
    -----------------------------------
    Model: USB Flash Memory USB Device
    
    Størelse: 254983680  <- Dette er i bytes
    
    -----------------------------------
    Harddisk:
    -----------------------------------
    Model: USB Flash Memory USB Device
    
    Størelse: 2006968320  <- Dette er i bytes
    
    -----------------------------------
    Harddisk:
    -----------------------------------
    Model: Generic USB Flash Disk USB Device
    
    Størelse: 4120865280  <- Dette er i bytes
    
    -----------------------------------
    Harddisk:
    -----------------------------------
    Model: Memorex Mini TD 001B USB Device
    
    Størelse: 2056320000  <- Dette er i bytes
    
    -----------------------------------
    Processer info:
    -----------------------------------
    Navn: Dual Core AMD Opteron(tm) Processor 170   
    
    Hastighed lige nu: 2950
    
    -----------------------------------
    Processer info:
    -----------------------------------
    Navn: Dual Core AMD Opteron(tm) Processor 170   
    
    Hastighed lige nu: 2950
    
    -----------------------------------
    Grafikkort:
    -----------------------------------
    Navn: NVIDIA GeForce 8800 GTS
    
    -----------------------------------
    Grafikkort:
    -----------------------------------
    Navn: 
    
    -----------------------------------
    Ram:
    -----------------------------------
    Total mængde Ram: 4293070848  <- Dette er i bytes
    
    Pretty cool my good sir. Even lists all my flash drives :D lol
    But I think it would be better in English for us that speak it :)
     
    10 Year Member at TPU
  3. z1tu

    z1tu

    Joined:
    Dec 31, 2008
    Messages:
    529 (0.17/day)
    Thanks Received:
    179
    Location:
    Romania
    Code:
    -----------------------------------
    Computer info:
    -----------------------------------
    Producent: Gigabyte Technology Co., Ltd.
    Produkt: GA-MA770-UD3
    
    -----------------------------------
    Harddisk:
    -----------------------------------
    Model: WDC WD2000JB-00GVC0
    
    Størelse: 200047034880  <- Dette er i bytes
    
    -----------------------------------
    Processer info:
    -----------------------------------
    Navn: AMD Athlon(tm) 7750 Dual-Core Processor
    
    Hastighed lige nu: 2712
    
    -----------------------------------
    Grafikkort:
    -----------------------------------
    Navn: ATI Radeon HD 4800 Series  
    
    -----------------------------------
    Ram:
    -----------------------------------
    Total mængde Ram: 2145824768  <- Dette er i bytes
    Here ya go ;)
     
  4. driver66

    driver66

    Joined:
    Jun 4, 2007
    Messages:
    1,050 (0.28/day)
    Thanks Received:
    115
    Location:
    indiana
    :toast:

    -----------------------------------
    Computer info:
    -----------------------------------
    Producent: http://www.abit.com.tw/
    Produkt: IP35-E (Intel P35+ICH9R)

    -----------------------------------
    Harddisk:
    -----------------------------------
    Model: ST31500341AS ATA Device

    Størelse: 1500298813440 <- Dette er i bytes

    -----------------------------------
    Harddisk:
    -----------------------------------
    Model: ST3300620AS ATA Device

    Størelse: 300066439680 <- Dette er i bytes

    -----------------------------------
    Processer info:
    -----------------------------------
    Navn: Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz

    Hastighed lige nu: 2387

    -----------------------------------
    Grafikkort:
    -----------------------------------
    Navn: NVIDIA GeForce 8800 GTS 512

    -----------------------------------
    Ram:
    -----------------------------------
    Total mængde Ram: 3488079872 <- Dette er i bytes
     

    Attached Files:

    10 Year Member at TPU
  5. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,817 (3.61/day)
    Thanks Received:
    5,629
    Location:
    Cheeseland (Wisconsin, USA)
    Seems to work okay, but it failed to see my camera on the USB port.
    Back to work for you !!! :laugh:
     
    10 Year Member at TPU
  6. z1tu

    z1tu

    Joined:
    Dec 31, 2008
    Messages:
    529 (0.17/day)
    Thanks Received:
    179
    Location:
    Romania
    oh yeah i forgot i had a usb camera also
     
  7. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,817 (3.61/day)
    Thanks Received:
    5,629
    Location:
    Cheeseland (Wisconsin, USA)
    What programming language are you using?
     
    10 Year Member at TPU
  8. Wrigleyvillain

    Wrigleyvillain PTFO or GTFO

    Joined:
    Oct 13, 2007
    Messages:
    7,693 (2.15/day)
    Thanks Received:
    1,788
    Location:
    Chicago
    Slick way to get us to install a trojan man! :pimp:

    I kid! I kid! Would help out too but at work on a Mac...
     
  9. Perra

    Joined:
    Feb 9, 2009
    Messages:
    147 (0.05/day)
    Thanks Received:
    22
    Location:
    Örebro, Sweden
    There ya go! :)

    I don't think the program even looks at the USB-ports, it only checks the harddrives and USB-sticks get listed as harddrives :)
     
  10. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,817 (3.61/day)
    Thanks Received:
    5,629
    Location:
    Cheeseland (Wisconsin, USA)
    I know. I wrote something similar to this as a little foray into the WMI.
    WMI leaves a bit to be desired. Directly accessing registers or ROM based information on hardware devices to get specific information is better done, or has to be done, other ways.

    That's why I told him, "Back to work for you". lol
     
    10 Year Member at TPU
  11. unibrow1990

    unibrow1990 New Member

    Joined:
    Mar 19, 2009
    Messages:
    194 (0.06/day)
    Thanks Received:
    29
    Location:
    Detroit, Michigan



    Worked fine for me.
     
  12. Lillebror New Member

    Joined:
    Jul 28, 2007
    Messages:
    719 (0.20/day)
    Thanks Received:
    88
    Location:
    Denmark
    Thanks for all the info, guys! haha, its not a trojan! ;) im just trying to learn to do more with WMI. The program is written Vb.net.

    Heres the full source for the program ;) Just add 2 buttons with the normal names, 1 textbox and 1 label.

    Code:
    Imports System
    Imports System.Management
    Imports System.Windows.Forms
    Imports System.IO
    
    Public Class Form1
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            'clear the textbox when you click the "kør" button
            TextBox1.Text = ""
    
            Try
                Dim searcher As New ManagementObjectSearcher("root\CIMV2", "SELECT * FROM Win32_BaseBoard")
    
                For Each queryObj As ManagementObject In searcher.Get()
    
                    TextBox1.AppendText("-----------------------------------")
                    TextBox1.AppendText(Environment.NewLine)
                    TextBox1.AppendText("Computer info:")
                    TextBox1.AppendText(Environment.NewLine)
                    TextBox1.AppendText("-----------------------------------")
                    TextBox1.AppendText(Environment.NewLine)
                    TextBox1.AppendText("Producent: " & queryObj("Manufacturer"))
                    TextBox1.AppendText(Environment.NewLine)
                    TextBox1.AppendText("Produkt: " & queryObj("Product"))
                    TextBox1.AppendText(Environment.NewLine)
    
                Next
            Catch err As ManagementException
                MessageBox.Show("An error occurred while querying for WMI data: " & err.Message)
            End Try
    
            Try
                Dim searcher As New ManagementObjectSearcher("root\CIMV2", "SELECT * FROM Win32_DiskDrive")
    
                For Each queryObj As ManagementObject In searcher.Get()
    
                    TextBox1.AppendText(Environment.NewLine)
                    TextBox1.AppendText("-----------------------------------")
                    TextBox1.AppendText(Environment.NewLine)
                    TextBox1.AppendText("Harddisk:")
                    TextBox1.AppendText(Environment.NewLine)
                    TextBox1.AppendText("-----------------------------------")
                    TextBox1.AppendText(Environment.NewLine)
                    TextBox1.AppendText("Model: " & queryObj("Model"))
                    TextBox1.AppendText(Environment.NewLine & Environment.NewLine)
                    TextBox1.AppendText("Størelse: " & queryObj("Size") & "  <- Dette er i bytes")
                    TextBox1.AppendText(Environment.NewLine)
    
                Next
            Catch err As ManagementException
                MessageBox.Show("An error occurred while querying for WMI data: " & err.Message)
            End Try
    
            Try
                Dim searcher As New ManagementObjectSearcher("root\CIMV2", "SELECT * FROM Win32_Processor")
    
                For Each queryObj As ManagementObject In searcher.Get()
    
                    TextBox1.AppendText(Environment.NewLine)
                    TextBox1.AppendText("-----------------------------------")
                    TextBox1.AppendText(Environment.NewLine)
                    TextBox1.AppendText("Processer info:")
                    TextBox1.AppendText(Environment.NewLine)
                    TextBox1.AppendText("-----------------------------------")
                    TextBox1.AppendText(Environment.NewLine)
                    TextBox1.AppendText("Navn: " & queryObj("Name"))
                    TextBox1.AppendText(Environment.NewLine & Environment.NewLine)
                    TextBox1.AppendText("Hastighed lige nu: " & queryObj("CurrentClockSpeed"))
                    TextBox1.AppendText(Environment.NewLine)
    
                Next
            Catch err As ManagementException
                MessageBox.Show("An error occurred while querying for WMI data: " & err.Message)
            End Try
    
            Try
                Dim searcher As New ManagementObjectSearcher("root\CIMV2", "SELECT * FROM Win32_VideoController")
    
                For Each queryObj As ManagementObject In searcher.Get()
    
                    TextBox1.AppendText(Environment.NewLine)
                    TextBox1.AppendText("-----------------------------------")
                    TextBox1.AppendText(Environment.NewLine)
                    TextBox1.AppendText("Grafikkort:")
                    TextBox1.AppendText(Environment.NewLine)
                    TextBox1.AppendText("-----------------------------------")
                    TextBox1.AppendText(Environment.NewLine)
                    TextBox1.AppendText("Navn: " & queryObj("Name"))
                    TextBox1.AppendText(Environment.NewLine)
    
                Next
            Catch err As ManagementException
                MessageBox.Show("An error occurred while querying for WMI data: " & err.Message)
            End Try
    
            Try
                Dim searcher As New ManagementObjectSearcher("root\CIMV2", "SELECT * FROM Win32_ComputerSystem")
    
                For Each queryObj As ManagementObject In searcher.Get()
    
                    TextBox1.AppendText(Environment.NewLine)
                    TextBox1.AppendText("-----------------------------------")
                    TextBox1.AppendText(Environment.NewLine)
                    TextBox1.AppendText("Ram:")
                    TextBox1.AppendText(Environment.NewLine)
                    TextBox1.AppendText("-----------------------------------")
                    TextBox1.AppendText(Environment.NewLine)
                    TextBox1.AppendText("Total mængde Ram: " & queryObj("TotalPhysicalMemory") & "  <- Dette er i bytes")
                    TextBox1.AppendText(Environment.NewLine)
    
                Next
            Catch err As ManagementException
                MessageBox.Show("An error occurred while querying for WMI data: " & err.Message)
            End Try
    
            Label2.Text = "Tryk så på CLIPBOARD for at kopiere det til CTRL + V"
    
        End Sub
    
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    
            'If the textbox dosnt contain anything, then display popup, or edit the label if it contains text
    
            If TextBox1.Text = "" Then
    
                MsgBox("husk at trykke på den anden knap først")
    
            Else
    
                Clipboard.SetText(TextBox1.Text.ToString)
                Label2.Text = "Tekst er nu kopieret til CTRL + V!"
    
            End If
    
        End Sub
    End Class
     
    10 Year Member at TPU
  13. human_error

    human_error

    Joined:
    Nov 10, 2008
    Messages:
    1,897 (0.60/day)
    Thanks Received:
    687
    worked fine for me too :)

    -----------------------------------
    Computer info:
    -----------------------------------
    Producent: ASUSTeK Computer INC.
    Produkt: P6T DELUXE

    -----------------------------------
    Harddisk:
    -----------------------------------
    Model: MAXTOR STM3500320AS

    Størelse: 500105249280 <- Dette er i bytes

    -----------------------------------
    Harddisk:
    -----------------------------------
    Model: SAMSUNG HD103UJ

    Størelse: 1000202273280 <- Dette er i bytes

    -----------------------------------
    Harddisk:
    -----------------------------------
    Model: ST31500341AS

    Størelse: 1500299297280 <- Dette er i bytes

    -----------------------------------
    Harddisk:
    -----------------------------------
    Model: vertex

    Størelse: 64025579520 <- Dette er i bytes

    -----------------------------------
    Processer info:
    -----------------------------------
    Navn: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz

    Hastighed lige nu: 1600

    -----------------------------------
    Grafikkort:
    -----------------------------------
    Navn: ATI Radeon HD 4870 X2

    -----------------------------------
    Grafikkort:
    -----------------------------------
    Navn: ATI Radeon HD 4870 X2

    -----------------------------------
    Ram:
    -----------------------------------
    Total mængde Ram: 6432149504 <- Dette er i bytes

    (in spoiler tags to save space)
     

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)