Wayne
Fri Dec 05 06:59:18 CST 2003
Hi,
Thanks for the reply. The script is in the GUIRunOnce
section of the unattended.sif
I am using an RIS server. The script resides in $oem$\$1
\Scripts folder and is copied to the local machine during
installation. I can only assume it is being executed on
the local machine.
Thus the reference to the share for the msi.
I just tested it by placing the msi on the local machine,
changing the script to:
Const ALL_USERS = True
Set objService = GetObject("winmgmts:")
Set objSoftware = objService.Get("Win32_Product")
errReturn = objSoftware.Install
("c:\DotNet\netfx.msi /Q", , ALL_USERS)
I got the following error
Line 3
Char 1
Error Not Found
Code 80041002
Source: SWbemServicesEx
However I can assure that the file is in the location as
specified.
thanks
Wayne
>-----Original Message-----
>Wayne wrote:
>
>> Hi,
>>
>> I am trying to install programs with msi's using VB
>> Script. I have found code that says,
>> -------
>> Const ALL_USERS = True
>> Set objService = GetObject("winmgmts:")
>> Set objSoftware = objService.Get("Win32_Product")
>> errReturn = objSoftware.Install
>> ("c:\scripts\database.msi", , ALL_USERS)
>> -----
>> the code I have been trying says
>> -----
>> Const ALL_USERS = True
>> Set objService = GetObject("winmgmts:")
>> Set objSoftware = objService.Get("Win32_Product")
>> errReturn = objSoftware.Install("\\server1
>> \DotNet$\netfx.msi /Q", , ALL_USERS)
>> ----
>> I get do response from the script. The paths to the msi
>> location are correct.
>
>Hi
>
>Where does this script run, in a computer startup script,
or user logon script,
>or do you just run it interactively?
>
>If you put netfx.msi on the local hard disk and change
your script to point to
>the local copy, does your script run then?
>
>
>--
>torgeir
>Microsoft MVP Scripting and WMI, Porsgrunn Norway
>Administration scripting examples and an ONLINE version
of the 1328 page
>Scripting Guide:
http://www.microsoft.com/technet/scriptcenter
>
>
>.
>