• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 768
  • Last Modified:

VB GetSetting, what is the "Section" and What is the "Key" value. - URGENT

I had to ask this because I have not worked with this functionality before and I don't have time to play and figure it out.  I am using a WIndows API call version of the .NET GetSetting function to pull a registry value.  The code still uses the same variables ad the basic GetSetting function but of course allows to to pull from HKEY_LOCAL_MACHINE instead of the practically useless VB key.  SO here is my dumb yet very urgent question.

I need to Figure out if a machine is running M$ Office XP or Office 2k3.  So I need to know which of the following regisrty keys Exists

HKEY_LOCAL_MACHINE\SOFTWARE\Company\ImageBuilder\ApplicationInstallations\Microsoft Word 2003 with SP1 - for 2k3

or

HKEY_LOCAL_MACHINE\SOFTWARE\Company\ImageBuilder\ApplicationInstallations\Microsoft Office XP Standard - for XP

ok, here's the stupid part.... ready.... promise not to laugh at me

in my variables I am assuming appname is WinWord.exe, because that is the executeable, is this wrong?

What would the Section value be? - \Company\ImageBuilder\ApplicationInstallations\???

And what is the key value?  

it's early, I am overworked and underpaid, so please be nice :-).  Thanks
0
Wonderflub
Asked:
Wonderflub
1 Solution
 
fds_fatboyCommented:
You can't do this with GetSetting/SetSetting.

Check out rdWillet's answer here (and give him/her) the points

http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/VB_Controls/Q_21389709.html
0
 
Shiju SasidharanAssoc Project ManagerCommented:
using this
SaveSetting "MyApp","Startup", "Left", 50

u can save entries in the key

HKEY_CURRENT_USER\Software\VB and VBA Program Settings\MyApp

thats all
0
 
Shiju SasidharanAssoc Project ManagerCommented:
using GetSetting ,
u can retrieve only the value u set using SaveSetting
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Shiju SasidharanAssoc Project ManagerCommented:
that is u can use the section "Startup" to get it back
      GetSetting( "MyApp", "Startup", "Left", "25")
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Are you using VB6 or VB.Net?

If VB6 then here is another approach:
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20626799.html
0
 
WonderflubAuthor Commented:
ok, perhaps I was not clear.... let me try again... I am not using the getSetting function, I am using code written with API calls that uses the same variables as the getsetting function.  I don't need to know how to do it, I jsut need to know what the value of AppName, Section, and Key, that's all, just what I would enter as the values.  ie. of hte reg key
HKEY_LOCAL_MACHINE\SOFTWARE\Company\ImageBuilder\ApplicationInstallations\Microsoft Word 2003 with SP1
what would I enter as the section?
0
 
wraith821Commented:
appname: HKEY_LOCAL_MACHINE\SOFTWARE\Company\ImageBuilder\ApplicationInstallations
section: Microsoft Word 2003 with SP1
key: the entry under the section
Value: the value of the key
0
 
rdwillettCommented:
Can you post the actual key and all the values under the key: HKEY_LOCAL_MACHINE\SOFTWARE\Company\ImageBuilder\ApplicationInstallations
The example  fds_fatboy references above that I gave will read any registry key.  As to what names to use: I ask you to post your actual registry so that I can give u a complete example.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now