Office Watch

Office 2013

Office 2010

Office 2007

Office 2003

Office XP

Office for Mere Mortals

Access

Email

Buying Office

Office 365

Winks

Office News Wire

Join us!

Our Ebooks

Mobile | PDA

RSS


Search

Command Finder


Microsoft Office Bookshop

About

Home




Retrieving basic PC information

How to get basic system specification info from the PC.

by Access Watch

Bookmark and Share

  | Mobile | click for more article services     


Q:  Briant Manix writes:  "Do you know how to get basic system specification info from the PC? I would imagine that the function would either use a Windows API or e look up in the Registry. I want to get an Access app to use VBA to interrogate the PC to determine if it meets the pre- install requirements."

A:  Years ago (maybe in Access 2 or 95) I dimly remember doing something (probably with API calls) to put some system information on an Access form, but I can't find this information currently (and if I could, it might not work with Access 2003 or 2007).

You can get a fair amount of system information through the Word System object without API calls (set a reference to Word in your Access code so you can use named constants for the property arguments).  However, it is not too accurate at present; apparently it has not been updated for many years.  I got "Windows NT" for the OS (on a computer running Win XP SP 2) and "Pentium" for the processor (it is actually a dual-core Intel chip).  There are no arguments for memory or available drives.  Figure C shows the attributes of the System object in the Object Browser:

Figure C.  The Word System object in the Object Browser

There is a list of API calls on the Microsoft Web site.  However, there is no explanation of the calls, and no examples of usage.

Another possibility is to use the PrivateProfileString property of the Word System object (this is a hidden property, so you won't see it in the Object Browser unless you turn on hidden members display).  The problem with this method is that the Registry is different on different computers, depending on their OS, so you can't depend on getting reliable information from the same Registry key on all computers.  The lines below print the Documents path to the Immediate window:

Set appWord = GetObject(, "Word.Application")

strDocsPath = appWord.System.PrivateProfileString("", _

  "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell _

  Folders", "Personal") & "\"

Debug.Print "Docs path: " & strDocsPath

Article posted: Monday, 05 May 2008

there's more ...

If you liked this article you'll LOVE our new ebooks.

Office 2013: the real startup guide

OFFICE 2013: the real startup guide Everything you need to know about Office 2013 but Microsoft won't tell you.

How to save money, install, configure and use the new features in Office 2013.  Get it today - click here.

Windows 8 for Microsoft Office users

Windows 8 for Microsoft Office users A practical guide the new, changed and unfamiliar in Windows 8

A focused and unvarnished look at Windows 8, especially written for the many people who use Microsoft Office  Get it today - click here.

ORGANIZING OUTLOOK EMAIL - tame your Outlook 2010 Inbox

100+ pages of practical tips and help to streamline, automate and search your Inbox.  Get more than you ever thought possible from Outlook.  Read it today - click here.



Article Services sponsored by: Office Watch Ebooks - available now to download and read today.
RSS feed for this category Subscribe

Translate | Mobile | Links
 Add to: Bookmarks | | DiggThis | Yahoo! My Web


New & Popular
» Office 365 and Office 2013 – what’s the difference?
» Word’s ‘New from Existing …’ feature
» New from existing document .. the alternatives
» Windows 8: changes or tweaks?
» Signed emails appear blank in Gmail
» Data Mining ‘fun’ coming soon


Office Watch, Office for Mere Mortals, Access Watch and all titles used within the publications are Copyright © 1996-2013 Office Watch.
Microsoft Office, Microsoft Word, Microsoft Excel, Microsoft Outlook, Microsoft Powerpoint and doubtless many other names are registered trademarks of Microsoft Corporation.

Search  |  Sitemap |  Popular Topics | Privacy Statement |  Advertising |  Twitter |  Feedback / Contact Us
Office Watch is definitely not affiliated with Microsoft - and that's just one reason why we are so useful to Microsoft Office users around the world J (Erko).