Results 1 to 8 of 8
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    New York
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Word Reg Strings v 8,9,10 (VBA Word 8,9,10)

    I'm using installshield to distribute template solutions.

    One uses both User-Template and Startup folder. The other JUST Startup folder.

    I would like to have the single install image check to see which version of word is installed. It would step through

    If 10 then
    elseif 9
    elseif 8
    endif

    So that if both 10 and 9 are installed, I'll install only to 10.

    The problem is this. MS seems to have changed various registry locations to look for folder information. And the info is different on a vanilla install and on an install where the user has modified Startup/user-template file locations using the Options.FileLocation tab. I have a routine that accounts for that. But what I'm having trouble with is bullet-proofedly determining which versions of Word are installed.

    Any ideas? Any registry strings that are ALWAYS written and unchanged that will tell me a version is installed?

    Thanks

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Word Reg Strings v 8,9,10 (VBA Word 8,9,10)

    I'm not sure about all versions, but if I wanted to know the default version I would look at:

    HKEY_CLASSES_ROOTWord.ApplicationCurVer

    Mine says:

    Word.Application.9

    Would be interesting to hear from someone with a dual install.

  3. #3
    Star Lounger
    Join Date
    Jan 2001
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word Reg Strings v 8,9,10 (VBA Word 8,9,10)

    There are two ways.
    First, Office (not just Word) records a Path value under

    HKEY_LOCAL_MACHINESOFTWAREMicrosoftOfficex.0Common InstallRoot

    You can reverse-loop through these settings by replacing x.0 with 10.0, 9.0, 8.0.
    The first time you get a Path value you know which version is most recent.

    For just Word (not Office) you can reverse-loop in the same way through

    HKEY_CURRENT_USERSoftwareMicrosoftOfficeX.0WordOpt ions

    and look for a PROGRAMDIR value

    As far as I can tell this is the only way to get the number of the most recent version.

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    New York
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word Reg Strings v 8,9,10 (VBA Word 8,9,10)

    Okay, Let's assume by looking at WordOptions ProgramDir or HKEY_CLASSES_ROOTWord.ApplicationCurVer or both -- we've discovered which version of Word is currently installed.

    Now, here's a follow up question:

    If a user has made absolutely NO CHANGES to the default setup; has installed and activated no Startup Add-ins; has made NO changes to NORMAL.DOT (so, basically, all the templates there are are the ones installed from the CD), in this very vanilla situation, are the registry entries --

    HKEY_CURRENT_USERSoftwareMicrosoftOffice10.0WordOp tionsSTARTUP-PATH
    and
    HKEY_CURRENT_USERSoftwareMicrosoftOffice10.0WordOp tionsUserTemplates

    --still in the registry? I know these values are written if one goes into Tools.Options.FileLocations and either changes or confirms the current path. But I'm not sure they are written by the default Office installation.

    Any suggestions on bullet-proofing finding these values?

  5. #5
    Star Lounger
    Join Date
    Jan 2001
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word Reg Strings v 8,9,10 (VBA Word 8,9,10)

    No, they won't be in the registry, but Tools.Options.FileLocations will return the default paths.

  6. #6
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    New York
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word Reg Strings v 8,9,10 (VBA Word 8,9,10)

    But the fact that I can get it from VBA is of no help if I'm writing an installation program with InstallShield or SetupFactory.

  7. #7
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    New York
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word Reg Strings v 8,9,10 (VBA Word 8,9,10)

    Here's a kludge I've used -- which seems to work -- but I'm not convinced it's the best solution:

    If I DON'T find TemplatePath and StartupPath by querying registry at the expect wordoptions keys, I then query the registry at:

    HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVe rsionExplorerShell FoldersAppData

    To the path returned I then append

    MicroSoftWordStartup

    and

    MicroSoftTemplates

    Does that sound a reasonable assumption?

  8. #8
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Vienna, Wien, Austria
    Posts
    5,009
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word Reg Strings v 8,9,10 (VBA Word 8,9,10)

    Can't quite remember about Win95, but it should work on all subsequent versions.
    Gre

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •