WinInstall LE does not pack files into MSI ?

R

Robert Engel

I'm trying to get some applications into MSIs using WinInstall LE
(from the Win2K Server CD).

Everything seems to work out fine, except that the application files
don't get packed inside the MSI. They seem to be copied in a sub
folder structure where the folder that contains the MSI is the root.
The generated MSIs only contain the references to the [external]
files. This means that i'd have to distribute the MSIs together with
the complete folder structure of the application, which is quite
unhandy. Is there a way to get these files packaged into the MSI,
creating everything-in-one-file-MSIs, using WinInstall LE?

Any help is greatly appreciated.
 
T

Tim Macaulay[MSFT]

I would not recommend packaging multiple MSI's into a single MSI. If you
are looking for a way to chain MSI Installations, I would recommend either
a vbscript or a setup wrapper that would chain them together.

264478 INFO: Disadvantages of Repackaging Applications
http://support.microsoft.com/?id=264478

=========================================================================

Here is some sample code that I have to do something like chaining MSI
installations.


'///////////////////////////////////////////////////////////////////////////
//////////////////////////
'// InstallProduct.vbs
'// Purpose: To chain MSI installations through VBScript
'//
'// The Installer.InstallProduct does not return any values.
'// In order to execute a MSI installation followed by another MSI
Installation,
'// we will need to execute a Do While loop to wait for the MsiServer
Service to stop running,
'// and then we will execute the next MSI install.
'///////////////////////////////////////////////////////////////////////////
//////////////////////////

'// declare variables needed
Dim installer, sproductpath, oLocator, oServices, s, TheService, getpath

sproductpath = "\\mypath\data\my installs\Basic2\basic2.msi" '// variable
for the 1st installation
sproductpath2 = "\\mypath\data\my installs\Basic2\basic2.msi" '// variable
for the 2nd installation

set installer = CreateObject("WindowsInstaller.Installer") '// create the
installer object

'///////////////////////////////////////////////////////////////////////////
//////////////////////////
'// using WMI to check the status of a service
'// 1. need to connect to the server
'// 2. request the service
'// 3. check the status of the service and if the service is started, stop
the service
'//
----------------------------------------------------------------------------
----------------------
Set oLocator = CreateObject("WbemScripting.SWbemLocator") '// creates an
instance of the wmi object
Set oServices = oLocator.ConnectServer("", "root\cimv2") '// creates an
instance of the connection to the server
s = "Win32_Service.Name=""MsiServer""" '// sets a variable for the service
we are requesting
Set TheService = oServices.Get(s) '// object instance of the service that
we requested
If TheService.State = "Running" then TheService.State = "Stopped" '// stop
the service if it is running
'///////////////////////////////////////////////////////////////////////////
//////////////////////////
'// You can call extra command-line properties by using the second argument
'// installer.installproduct(sproductpath, "ALLUSERS=1")

installer.installproduct(sproductpath) '// launch the installation of the
msi package
do while TheService.State = "Running"
'// do nothing, because we will exit the do once the service state changes
loop

installer.InstallProduct(sproductpath2) '// launch the second installation
of the msi package
do while TheService.State = "Running"
'//do nothing, because we will exit the do once the service state changes
loop

'// Displaying the Status of the installation
MsgBox "The Installation Completed Successfully"


'// destroys the object
set installer = nothing
set oLocator = nothing
set oServices = nothing
set TheService = nothing

=========================================================================

WinInstall LE Support: http://www.ondemandsoftware.com/support.asp

Cheers,
Tim Macaulay, MCSD, MCP.Net
Microsoft Corp.
This posting is provided "AS IS" with no warranties, and confers no rights
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top