PC Review


Reply
Thread Tools Rate Thread

win32_product install for office

 
 
Kris
Guest
Posts: n/a
 
      16th Apr 2004
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

 
Reply With Quote
 
 
 
 
Guest
Posts: n/a
 
      16th Apr 2004
Error code 2 is "Cannot find the file specified"

HTH





>-----Original Message-----
>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
>
>.
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Win32_Product collection returning NULL Carl29464 Windows XP WMI 0 18th Dec 2007 04:06 PM
WMI script to get Win32_Product Brian Henry Microsoft VB .NET 5 4th Apr 2006 01:44 AM
help using Win32_Product.Uninstall Steve Long Microsoft C# .NET 3 20th Jan 2006 10:39 PM
WMI: Win32_Product - Does not return all products Dimitri Meeuws Windows XP WMI 3 29th Oct 2004 08:46 PM
win32_product is not giving full SW information Shaharulla.C Microsoft Windows 2000 Developer 0 26th Aug 2003 01:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:30 PM.