No announcement yet.

How to work with the registry

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to work with the registry

    Hello all,

    I work for the Health Department in Western Australia and have written a few applications to make life easier for our users and

    They are currently written in AutoIT but are fairly bulky executables, which concerns me if we are going to run them on login against 1000+ pc's through Group Policy.

    I have looked into PowerBasic; which my manager seeks to approve for purchase; however my applications are very registry intensive and I have found very little documentation in the way of working with the registry via WIN32API. I do like to learn by example (ie. others code) but would like to read syntax etc.

    Is there something i am missing?

    Soon to be powerbasic user in anticipation,

  • #2
    Hi James,
    you may have a look at Registry functions and Registry enumeration.


    • #3
      Thankyou Pierre, i've figured out how to include them... PowerBASIC looks to be a great programming environment...


      • #4
        Welcome aboard (hopefully!) James.
        ... however my applications are very registry intensive
        If/when you decide to move these to PB, I'd highly recommend you start a little discussion here about your methods. The registry is ok for small scraps of information that you want to retain, but I'd be very, very, very scared of writing any program that is "registry intensive'. There are at least a half-dozen better methods you can use, and none that would require any significant extra coding.

        Even MS is recommending sparing use of the Registry. Remember its a huge database with no real safeguards to maintain its integrity. If you store data there, you're pretty much on your own when things go south. (and they will with the registry. I know from personal experience )

        Just remember, there's always multiple paths to the same end and PB allows you to take whatever path you choose
        Software makes Hardware Happen


        • #5
          Probably used the wrong word, not intensive as in constant read/write; but program runtime behaviour varying vastly due to registry values.

          Only things it looks at are how Outlook is setup in an Exchange environment and default printers etc.

          I've noticed that PowerBASIC has some commands relating to printer interaction so i wonder if this will aid me in converting my programs...


          • #6
            For printers specifically, there is no reason to read the registry at all, as there are both PB intrinsic functions and Windows API functions which can tell you more than you'd ever want to know about all printers available to a system.

            Can't tell what you are doing with Outlook, but if you are looking in the registry just to get some values to send email, there are WinAPI functions to handle that, too.

            I believe Outlook also offers an API which would allow you to call functions instead of reading/writing the registry ... or wherever the current version of Outlook stores whatever info you are working with. Currency may be significant in your application, because unless I am badly mistaken Microsoft has a habit of changing "exactly" how they store and access control data across Outlook versions.
            Michael Mattias
            Tal Systems (retired)
            Port Washington WI USA
            [email protected]


            • #7
              because unless I am badly mistaken Microsoft has a habit of changing "exactly" how they store and access control data across Outlook versions
              No, you're not mistaken. Just another reason why "friends don't let friends use outlook"
              Software makes Hardware Happen


              • #8
                "friends don't let friends use outlook"
                Exactly Joe, "Now toss me another beer since I am driving"

                Ok a lil off topic there but almost on....Registry is like a driver, have one too many, it is too many, and likely chances of BLAMO. (one way or the other)
                Engineer's Motto: If it aint broke take it apart and fix it

                "If at 1st you don't succeed... call it version 1.0"

                "Half of Programming is coding"....."The other 90% is DEBUGGING"

                "Document my code????" .... "WHYYY??? do you think they call it CODE? "