Jump to content
Sign in to follow this  
ScriptUSER

Checking if word is installed

Recommended Posts

I am using th following script to identify if Msword is installed on a users computer .

There are differnt versions of Word like 9 , 10 , 11 ....

my code checks for vesion 10 and works if i subsiute 11 works for vr 11 .

how could i modify my code to work for all versions , without additional scipting ?

CODE
$sPath = RegRead("HKLM\SOFTWARE\Microsoft\Office\10.0\Word\InstallRoot", "Path")

If @error Then

;MsgBox(48, "Error", "MS Office 2002 is not installed.")

ColorDemo5()

Exit

EndIf

Share this post


Link to post
Share on other sites

Try this

Local $objWord = ObjCreate("Word.Application")

If IsObj($objWord) then 
Msgbox (0,"","Version: " & $objWord.Caption & " " & $objWord.Version & @crlf _
                & "Build: " & $objWord.Build)
$objWord.Quit
Else
    Msgbox (0,"","Word is not installed")
EndIf

Share this post


Link to post
Share on other sites

RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\winword.exe\Path")

I think you mean

RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\winword.exe","Path")

since it requires 2 parameters.

Thanks for the code, I needed it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...