Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel registry key
Does the following key exist in the Windows XP and Windows Vista registries
for an installed Excel? The example is for Excel 2003 (version 11). '[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications11\Excel11] |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel registry key
XP: Yes. Why do you ask?
- Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Howard Kaikow" wrote in message ... Does the following key exist in the Windows XP and Windows Vista registries for an installed Excel? The example is for Excel 2003 (version 11). '[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications11\Excel11] |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel registry key
Howard.
The key exists in my WindowsXP Registry with full suite of Office 11 Professional installed. Gord Dibben MS Excel MVP On Sun, 9 Mar 2008 20:43:48 -0400, "Howard Kaikow" wrote: Does the following key exist in the Windows XP and Windows Vista registries for an installed Excel? The example is for Excel 2003 (version 11). '[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications11\Excel11] |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel registry key
"Jon Peltier" wrote in message
... XP: Yes. Why do you ask? The usual method for displaying a string that identifies the version of a program, in this case Excel, is to start the app, get the version and then use a Select Case or If to determine which string to display. A better, or more general, way would be to use the API to first see whether the app is installed. If installed, determine the version specific progid, then get the "title": of the prog from the registry BEFORE opening the program. This eliminates the need to hard code titles within programs, and, as long as MSFT does't change things, eliminates the need to change the program, for this purpose, by hard coding titles of future versions. Being masochistic, I looked thru the registry and found the key I referenced. If the same key is available in Win 2000, XP and Vista, the hard coding of titles is not necessary, Of course, I have tested this only for Excel 2003, not yet for Excel 97, 2000, or 2002. I expect to do this next week. "Howard Kaikow" wrote in message ... Does the following key exist in the Windows XP and Windows Vista registries for an installed Excel? The example is for Excel 2003 (version 11). '[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications11\Excel11] |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel registry key
FWIW, Office 10 and 9 have similar keys
Office 10: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications10\Excel10] Office 9: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications\Excel] You could also look for [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\X.0\C ommon\InstallRoot] which contains a key named 'Path' with the installation directory of that version of Office. This is consistent for Excel 8.0 through 12.0. If you want to look for a specific product, use Excel, Word, Access, etc., in place of Common. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Howard Kaikow" wrote in message ... "Jon Peltier" wrote in message ... XP: Yes. Why do you ask? The usual method for displaying a string that identifies the version of a program, in this case Excel, is to start the app, get the version and then use a Select Case or If to determine which string to display. A better, or more general, way would be to use the API to first see whether the app is installed. If installed, determine the version specific progid, then get the "title": of the prog from the registry BEFORE opening the program. This eliminates the need to hard code titles within programs, and, as long as MSFT does't change things, eliminates the need to change the program, for this purpose, by hard coding titles of future versions. Being masochistic, I looked thru the registry and found the key I referenced. If the same key is available in Win 2000, XP and Vista, the hard coding of titles is not necessary, Of course, I have tested this only for Excel 2003, not yet for Excel 97, 2000, or 2002. I expect to do this next week. "Howard Kaikow" wrote in message ... Does the following key exist in the Windows XP and Windows Vista registries for an installed Excel? The example is for Excel 2003 (version 11). '[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications11\Excel11] |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel registry key
"Jon Peltier" wrote in message
... FWIW, Office 10 and 9 have similar keys Office 10: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications10\Excel10] Office 9: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications\Excel] You could also look for [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\X.0\C ommon\InstallRoot] which contains a key named 'Path' with the installation directory of that version of Office. This is consistent for Excel 8.0 through 12.0. If you want to look for a specific product, use Excel, Word, Access, etc., in place of Common. Thanx. I'll check version 8 later this week. 1. I prefer to use the Windows API to get the path, etc. For example, see ' KB 183544: How To Call CLSID And ProgID Related COM APIs in Visual Basic 2. I have not yet found a way, using the Windows API, to get the product "title" in an easily determined way. The key I listed seems to be the most direct way and is easily programmable as the version can be determind using Windows API, e.g., as in KB 183544, without starting Excel. |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel registry key
"Howard Kaikow" wrote in message
... Does the following key exist in the Windows XP and Windows Vista registries for an installed Excel? The example is for Excel 2003 (version 11). '[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications11\Excel11] Sigh! The key does not exist for Excel 97. The following works, but has the extraneous " Application". [HKEY_CLASSES_ROOT\Excel.Application.8] @="Microsoft Excel 97 Application" I'll now give it a try with Excel 2000, Excel 2002, and Excel 2003/ |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel registry key
I can't see the earlier posts, what's the objective.
If it's to add/remove addins from the collection these are the locations to read/write (with all Excel instances closed). HKCU\Software\Microsoft\Office\v.0\Excel then for xl97, v=8, Installed addins \Microsoft Excel and later versions v = 9 to 11, installed addins \Options xl97-2003, v = 8 to 11, non-installed addins \Add-in Manager don't know about Excel-2007, but same in W98 - Vista. Regards, Peter T "Howard Kaikow" wrote in message ... "Howard Kaikow" wrote in message ... Does the following key exist in the Windows XP and Windows Vista registries for an installed Excel? The example is for Excel 2003 (version 11). '[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications11\Excel11] Sigh! The key does not exist for Excel 97. The following works, but has the extraneous " Application". [HKEY_CLASSES_ROOT\Excel.Application.8] @="Microsoft Excel 97 Application" I'll now give it a try with Excel 2000, Excel 2002, and Excel 2003/ |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel registry key
... but same in W98 - Vista.
to clarify - I meant the registry keys are same in the respective OS (at least they are in my respective OS). However default addin file locations are not the same. Peter T "Peter T" <peter_t@discussions wrote in message ... I can't see the earlier posts, what's the objective. If it's to add/remove addins from the collection these are the locations to read/write (with all Excel instances closed). HKCU\Software\Microsoft\Office\v.0\Excel then for xl97, v=8, Installed addins \Microsoft Excel and later versions v = 9 to 11, installed addins \Options xl97-2003, v = 8 to 11, non-installed addins \Add-in Manager don't know about Excel-2007, but same in W98 - Vista. Regards, Peter T "Howard Kaikow" wrote in message ... "Howard Kaikow" wrote in message ... Does the following key exist in the Windows XP and Windows Vista registries for an installed Excel? The example is for Excel 2003 (version 11). '[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications11\Excel11] Sigh! The key does not exist for Excel 97. The following works, but has the extraneous " Application". [HKEY_CLASSES_ROOT\Excel.Application.8] @="Microsoft Excel 97 Application" I'll now give it a try with Excel 2000, Excel 2002, and Excel 2003/ |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel registry key
My first post was:
"Does the following key exist in the Windows XP and Windows Vista registries for an installed Excel? The example is for Excel 2003 (version 11). '[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications11\Excel11]" Second post was: "The usual method for displaying a string that identifies the version of a program, in this case Excel, is to start the app, get the version and then use a Select Case or If to determine which string to display. A better, or more general, way would be to use the API to first see whether the app is installed. If installed, determine the version specific progid, then get the "title": of the prog from the registry BEFORE opening the program. This eliminates the need to hard code titles within programs, and, as long as MSFT does't change things, eliminates the need to change the program, for this purpose, by hard coding titles of future versions. Being masochistic, I looked thru the registry and found the key I referenced. If the same key is available in Win 2000, XP and Vista, the hard coding of titles is not necessary, Of course, I have tested this only for Excel 2003, not yet for Excel 97, 2000, or 2002. I expect to do this next week." Currently, the following interim code works ( I left out obvious functions): sProgIDVersion = GetProgIDVersion(sProgID) sProgVersion = TrimNull(Mid$(sProgIDVersion, Len(sProgID) + 2)) On Error GoTo 0 ' Debug.Print sProgID, sProgIDVersion, sProgVersion ' Debug.Print GetRegistryString(HKEY_CLASSES_ROOT, sProgIDVersion) '8:Microsoft Excel 97 Application '9:Microsoft Excel Application '10:Microsoft Excel Application '11:Microsoft Office Excel Application If Len(sProgVersion) < 0 Then Select Case CLng(sProgVersion) Case Is < 8 MsgBox "This program requires the installed version of Microsoft Excel to be at least Microsoft Excel 97.", _ vbCritical + vbOKOnly, sFormTitle Unload Me Exit Sub Case 8 '[HKEY_CLASSES_ROOT\Excel.Application.8] sExcel = GetRegistryString(HKEY_CLASSES_ROOT, sProgIDVersion) Case 9 '[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications11\Excel11] sExcel = GetRegistryString(HKEY_LOCAL_MACHINE, _ "SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications" _ & sCharBackSlash & "Excel") Case Else '10,11,??? '[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications11\Excel11] sExcel = GetRegistryString(HKEY_LOCAL_MACHINE, _ "SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications" _ & sProgVersion & sCharBackSlash & "Excel" & sProgVersion) End Select End If ' Debug.Print sExcel '8:Microsoft Excel 97 Application '9:Microsoft Excel 2000 '10:Microsoft Excel 2002 '11:Microsoft Excel 2003 If Len(sExcel) = 0 Then sExcel = "Microsoft Excel version " & sProgVersion End If |
#11
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel registry key
Thanks for filling me in, guess I had deleted the earlier posts froim my
news-reader. FYI I don't have this on my w98se/xl87/xl2k (will look at other machines later) '[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications11\Excel11]" but I do have HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications\Excel\ but nothing of much use in its three sub keys ActiveWorkbook, ActiveWorkbook & Charts. The keys I mentioned previously should identify which version(s) is/are installed (ie the "v.0"). Typically the latest version is the default version, at least it should be, but to confirm I suppose could look at this HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Excel.Applicat ion\CurVer Regards, Peter T "Howard Kaikow" wrote in message ... My first post was: "Does the following key exist in the Windows XP and Windows Vista registries for an installed Excel? The example is for Excel 2003 (version 11). '[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications11\Excel11]" Second post was: "The usual method for displaying a string that identifies the version of a program, in this case Excel, is to start the app, get the version and then use a Select Case or If to determine which string to display. A better, or more general, way would be to use the API to first see whether the app is installed. If installed, determine the version specific progid, then get the "title": of the prog from the registry BEFORE opening the program. This eliminates the need to hard code titles within programs, and, as long as MSFT does't change things, eliminates the need to change the program, for this purpose, by hard coding titles of future versions. Being masochistic, I looked thru the registry and found the key I referenced. If the same key is available in Win 2000, XP and Vista, the hard coding of titles is not necessary, Of course, I have tested this only for Excel 2003, not yet for Excel 97, 2000, or 2002. I expect to do this next week." Currently, the following interim code works ( I left out obvious functions): sProgIDVersion = GetProgIDVersion(sProgID) sProgVersion = TrimNull(Mid$(sProgIDVersion, Len(sProgID) + 2)) On Error GoTo 0 ' Debug.Print sProgID, sProgIDVersion, sProgVersion ' Debug.Print GetRegistryString(HKEY_CLASSES_ROOT, sProgIDVersion) '8:Microsoft Excel 97 Application '9:Microsoft Excel Application '10:Microsoft Excel Application '11:Microsoft Office Excel Application If Len(sProgVersion) < 0 Then Select Case CLng(sProgVersion) Case Is < 8 MsgBox "This program requires the installed version of Microsoft Excel to be at least Microsoft Excel 97.", _ vbCritical + vbOKOnly, sFormTitle Unload Me Exit Sub Case 8 '[HKEY_CLASSES_ROOT\Excel.Application.8] sExcel = GetRegistryString(HKEY_CLASSES_ROOT, sProgIDVersion) Case 9 '[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications11\Excel11] sExcel = GetRegistryString(HKEY_LOCAL_MACHINE, _ "SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications" _ & sCharBackSlash & "Excel") Case Else '10,11,??? '[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications11\Excel11] sExcel = GetRegistryString(HKEY_LOCAL_MACHINE, _ "SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications" _ & sProgVersion & sCharBackSlash & "Excel" & sProgVersion) End Select End If ' Debug.Print sExcel '8:Microsoft Excel 97 Application '9:Microsoft Excel 2000 '10:Microsoft Excel 2002 '11:Microsoft Excel 2003 If Len(sExcel) = 0 Then sExcel = "Microsoft Excel version " & sProgVersion End If |
#12
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel registry key
"Peter T" <peter_t@discussions wrote in message
... Thanks for filling me in, guess I had deleted the earlier posts froim my news-reader. FYI I don't have this on my w98se/xl87/xl2k (will look at other machines later) '[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications11\Excel11]" but I do have HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSInfo\Categories\Applications\Excel\ but nothing of much use in its three sub keys ActiveWorkbook, ActiveWorkbook & Charts. The keys I mentioned previously should identify which version(s) is/are installed (ie the "v.0"). Typically the latest version is the default version, at least it should be, but to confirm I suppose could look at this HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Excel.Applicat ion\CurVer My goal was to get the version specific program "name", not the version. The version can be obtained using the techniques in KB 183544: How To Call CLSID And ProgID Related COM APIs in Visual Basic. My goal was to find an easily determined registry key that displayed the version specific product name without my having to hard code such names. This is doable for versions 10 and 11, but for versions 8 and 9, might as well hard code the name, tho there might be language specific differences. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Changing Windows Registry from Excel | Excel Programming | |||
Reading registry with Excel | Excel Programming | |||
Reading registry with Excel | Excel Programming | |||
Excel Registry Add in settings | Excel Programming |