Announcement

Collapse

Maintenance

The forum could be offline for 30-60 minutes in the very near future for maintenance (said 3pm Pacific). I was behind on getting this notice. I do apologize.
See more
See less

Checking system settings

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Checking system settings

    Where would one go to to find information on how to retrieve
    system information? I.e., how many USB devices are connected,
    identify the USB devices, type of monitor, printer out of paper,
    etc. I have in mind something similiar to BeLarc Advisor. Is
    that possible in Power Basic please? Thank you.

    ------------------

  • #2
    I'm not familiar with "BeLarc Advisor", but many things are possible in DOS, but it depends on how much time/effort you have to offer, and whether or not you will need additional tools too perform the task.

    Firstly, a good source of information on USB and related programming can be found at www.lvr.com - they might even show how to enumerate the installed ports.

    However, if the PC is running Windows, then you should be looking to extract the information from Windows, especially since many hardware items these days are simply not usable from DOS (ie, they are Windows-only devices). To gather information from Windows, you might consider writing a Windows app to query the registry, or you might find a way to export the hardware profile section to a disk file that you can examine from DOS.

    For example, items such as the type of monitor that is connected is not really relevent to a DOS app as such. However, PC's can have up to 16 monitors connected too (today's technology), but there is no way to query those monitor from DOS (at least, that I am aware of).

    Also, under Windows, the status of the printer should not be of any concern to the application as it is handled by the printer spooler. However, in plain DOS and the hybrid versions of Windows (95/98/ME) and the older 16-bit versions, you can test the port status directly - see LptStatus() in COMMUNIT.BAS in the EXAMPLES folder of your PB/DOS install.

    Does this help?

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment


    • #3
      Does it help? Well, I think I am going in the right direction here. I would really like to be able to query a computer system about how many monitor connections it is capable of, and then requery how many of those work.

      Example: Customer brings a DOS computer to us. S/he explains the computer has nine (whatever- 2 or 3 or 4, etc.) monitors hooked to at work.

      It would be nice to query it in some method. Yes, I am willing to put the time into writing this- it is happening too often for me not to develope a "time-saver" somewhere.

      Thanks

      ------------------

      Comment


      • #4
        The problem is that there is no "standard" way to find these kind of "advanced" options in modern (Windows-only and/or hosted-based) hardware, so you may have to write code to query every type of graphics card being made, etc.

        Worse still, a PC capable of 16 monitors might only report the actual number that are plugged in at any moment... assuming you can work out how to query individual multi-head graphics cards when the PC has 4 installed.

        If I'm sounding negative here, its because I am.

        In all honesty, I think this kind of project is simply impractical because the hurdles are simply too tall and numerous. Still, it might be an interesting project if you have a LOT of time on your hands.

        For a starting point, you _might_ find that source code to a Linux Distro installer or Kernel might be able to show you how to detect/examine some of the more common modern hardware devices.

        Good Luck!

        ------------------
        Lance
        PowerBASIC Support
        mailto:[email protected][email protected]</A>
        Lance
        mailto:[email protected]

        Comment


        • #5
          Lance, you have not sounded negative to me. You have always
          sounded to-the-point, honest and just a tad terse. Those are the
          kinds of answers I prefer! I have asked yes/no questions in
          my work and gotten a 60 minute answer!!

          ------------------

          Comment

          Working...
          X