?
Solved

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

Posted on 2005-04-15
8
Medium Priority
?
743 Views
Last Modified: 2013-12-26
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
Comment
Question by:Wonderflub
8 Comments
 
LVL 10

Expert Comment

by:fds_fatboy
ID: 13790969
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
 
LVL 14

Expert Comment

by:Shiju Sasidharan
ID: 13791040
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
 
LVL 14

Expert Comment

by:Shiju Sasidharan
ID: 13791071
using GetSetting ,
u can retrieve only the value u set using SaveSetting
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 14

Expert Comment

by:Shiju Sasidharan
ID: 13791099
that is u can use the section "Startup" to get it back
      GetSetting( "MyApp", "Startup", "Left", "25")
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 13791198
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
 

Author Comment

by:Wonderflub
ID: 13791576
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
 
LVL 8

Accepted Solution

by:
wraith821 earned 2000 total points
ID: 13795889
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
 
LVL 4

Expert Comment

by:rdwillett
ID: 13796281
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question