win32_product install for office

  • Thread starter Thread starter Kris
  • Start date Start date
K

Kris

I have a script which uses WMI Win32_Product to install
Office 2000 SP3. Which is returning an error code of 2 and
office does not get installed. I cannot find any
information on what this error code is or how to fix it.

The is only part of a script that runs on computer
startup. So it would be running under the system account.

Any ideas ?


Set objWMIService = GetObject("winmgmts:
{impersonationLevel=impersonate}!\\" & strComputer
& "\root\cimv2")
Set objSoftware = objWMIService.Get("Win32_Product")
errInstall_OFFICE = objSoftware.Install
(strOFFICEPath,"TRANSFORMS=" & strOfficeTransform & "
REBOOT=ReallySuppress",True)
writelog " - Microsoft Office 2000 SP-3 Standard
Install result is: " & errInstall_OFFICE,true
If errInstall_OFFICE <> 0 Then
WriteLog " - Error in
Install_OFFICE", "FAIL",true
strStatus = "FAILED"
strStatusComment = "...Failed to install
Microsoft Office SP-3 Standard."
else
writelog " - Installation
successful...",true
strStatus = "SUCCESS"
strStatusComment = "...Successfully
installed Microsoft Office SP-3 Standard."
End If
 
Back
Top