Posts

Showing posts with the label Word 2007

VB Script to check for Microsoft Office 2003 and Word 2007

I had written this script to check the presence of MS Office 2003 and Word 2007 on a machine before proceeding for installation. Here is the code: officepath11= sProgramFilesDir & "\Microsoft Office\Office11\" officepath12= sProgramFilesDir & "\Microsoft Office\Office12\" 'set File System Object set fso=createobject("scripting.filesystemobject") 'Check if file exists for Office 2003 and if yes then its version path11 = fso.GetAbsolutePathName("C:\Program Files (x86)\Microsoft Office\Office11\winword.exe") if (fso.FileExists(path11)) then returnstring11=fso.getfileversion(officepath11 & "winword.exe") else returnstring11="Null" end if 'Check if file exists for Word 2007 and if yes then its version path12 = fso.GetAbsolutePathName("C:\Program Files (x86)\Microsoft Office\Office12\winword.exe") if (fso.FileExists(path12)) then returnstring12=fso.getfileversion(officepath12 & "winword....