Jump to content











Photo

Tutorial request

msi integration request

  • Please log in to reply
12 replies to this topic

#1 Elliot Labs

Elliot Labs

    Newbie

  • Members
  • 23 posts
  • Location:Utopia Planitia Fleet Yards
  • Interests:Computers, more specifically Systems Administration.
  •  
    United States

Posted 20 January 2015 - 03:52 PM

Hi, Internet,

 

Could somebody create a tutorial on how to use MSI files with your WinBuilder script?

 

This could come in handy for integrating redistributable components that were downloaded from MS or other programs that are distributed as a MSI file.

 

thanks!



#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 20 January 2015 - 07:26 PM

Well, it is interesting how this section of the board:

http://reboot.pro/forum/112-tutorials/

is titled:

 

Tutorials
Post your guides and tutorials about winbuilder projects on this section. If you have a tutorial request, please place it on the support section.

 

 

:whistling:

 

:duff:

Wonko



#3 Elliot Labs

Elliot Labs

    Newbie

  • Members
  • 23 posts
  • Location:Utopia Planitia Fleet Yards
  • Interests:Computers, more specifically Systems Administration.
  •  
    United States

Posted 20 January 2015 - 07:34 PM

Well, it is interesting how this section of the board:

http://reboot.pro/forum/112-tutorials/

is titled:

 

 

:whistling:

 

:duff:

Wonko

lol, I missed that,
Is there a way that I can move the thread?



#4 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 20 January 2015 - 08:38 PM

lol, I missed that,
Is there a way that I can move the thread?

Naah, but don't worry :) (or don't worry too much :w00t: ) if you check the contents of the section you will see how a non-trifling amount of threads are by people that misinterpreted (or missed) that and posted either a request for a tutorial or even more OT :ph34r: a request for help/support for *almost anything*, or if you prefer, it is very common that this happens.

 

:duff:

Wonko



#5 Elliot Labs

Elliot Labs

    Newbie

  • Members
  • 23 posts
  • Location:Utopia Planitia Fleet Yards
  • Interests:Computers, more specifically Systems Administration.
  •  
    United States

Posted 20 January 2015 - 08:54 PM

Naah, but don't worry :) (or don't worry too much :w00t: ) if you check the contents of the section you will see how a non-trifling amount of threads are by people that misinterpreted (or missed) that and posted either a request for a tutorial or even more OT :ph34r: a request for help/support for *almost anything*, or if you prefer, it is very common that this happens.

 

:duff:

Wonko

Lol, Should I recreate this request in a different forum?



#6 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 21 January 2015 - 11:14 AM

Just brainstorming:

 

I'm rather sure that no tutorial can be written, because IMHO nobody did process MSI files in a project / script before.

 

There should be (to be developed!) a script which unpacks the MSI and adds files / registry entries etc. to the build, according the contents of the MSI.

 

Some month ago I tried the "alternate way":

 

During build:

Copy the MSI setup to the PE

Copy the *.msi file to the  PE

 

In the PE:

Setup MSI

Install the app from *.msi

 

Result: Trying to setup MSI, brought the error, that this is not possible in a PE :frusty:

 

Peter



#7 Elliot Labs

Elliot Labs

    Newbie

  • Members
  • 23 posts
  • Location:Utopia Planitia Fleet Yards
  • Interests:Computers, more specifically Systems Administration.
  •  
    United States

Posted 21 January 2015 - 03:54 PM

Just brainstorming:

 

I'm rather sure that no tutorial can be written, because IMHO nobody did process MSI files in a project / script before.

 

There should be (to be developed!) a script which unpacks the MSI and adds files / registry entries etc. to the build, according the contents of the MSI.

 

Some month ago I tried the "alternate way":

 

During build:

Copy the MSI setup to the PE

Copy the *.msi file to the  PE

 

In the PE:

Setup MSI

Install the app from *.msi

 

Result: Trying to setup MSI, brought the error, that this is not possible in a PE :frusty:

 

Peter

I have already though about doing that but then I though that some of the MSIs might be larger than the RAM drive can expand to...

There is the MSI component in the Windows 7 PE SE that allow you to use MSI files while booted in PE...



#8 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 21 January 2015 - 04:31 PM

There is the MSI component in the Windows 7 PE SE that allow you to use MSI files while booted in PE...

Sorry that I cannot help here.

 

I'm not familar with win7pe_se, and I do not intend to become familar with it. :smart:

 

Peter



#9 Elliot Labs

Elliot Labs

    Newbie

  • Members
  • 23 posts
  • Location:Utopia Planitia Fleet Yards
  • Interests:Computers, more specifically Systems Administration.
  •  
    United States

Posted 21 January 2015 - 09:59 PM

I use Win7PE_SE for compatibility reasons over Win8PE_SS because some of my clients bring in older hardware sometimes. If all of the hardware is newer I would be using Windows 8 but it is not an ideal world. :lamo:



#10 RoyM

RoyM

    Frequent Member

  • .script developer
  • 420 posts
  • Interests:"Booting and Owning".
  •  
    United States

Posted 22 January 2015 - 03:58 AM

I'm not up to a tutorial, but I will share some snippets of my own code and experience.
 
just expanding the contents of .msi files, sometimes ends up with a big mess of files,
associated with alternative install modes etc, etc, (i.e.) Language, Locale, Architecture.
 
When using msiexec to extract the contents, the results end up more of what you might expect.
 
Also, there are other switches available to msiexec and also the .msi files themselves.
netfx_core_x64.msi /qn
 
When I retrieve all of my notes I will try to share them.
 
EDIT: Sorry, Just notice the LiveXP part
I also noticed that in my build is this:
************************************************************************************
C:\Win7PE_SE\Projects\LiveXP\Components\Core\2 Update\20050902_msi.script
//reg_add,0x1,"%reg%\ControlSet001\Services\MSIServer","Description","Installs, repairs and removes software according to instructions contained in .MSI files."
 
You might try a test and uncomment the line, and do a new build and see if that helps with .msi install.
 
 
 
Some Examples:
***********************************************************************************
This is simply expanding the contents of the .msi file using 7-Zip.
 
%ProgramMSI%="AccessData FTK Imager.msi"
ShellExecute,Hide,%Tools%\7z.exe,"x #$q%GlobalSupport%\Downloads\%ProgramFolder%\%ProgramMSI%#$q -y -o#$q%ProjectTemp%\TempExtractFolder\%ProgramFolder%#$q"
 
************************************************************************************
This uses the Host OS msiexec to extract the contents of the .msi
 
[ExtractMSI]
Echo,".....Starting ExtractMSI...",WARN
If,ExistFile,"%WindowsSystemDir%\msiexec.exe",Begin
  // *** Apply patch to CoreMSI ***
  ShellExecute,Hide,"cmd.exe","/C cd #$q%ExtractFolder%#$q&&%WindowsSystemDir%\msiexec.exe /a #$q%CoreMSI%#$q /p %KB2468871-v2-% /qn#$q /l %KB2468871-v2-%.log"
  Echo,"MSIexec applying patch to %CoreMSI% exited with: %ExitCode%"
  ShellExecute,Hide,"cmd.exe","/C cd #$q%ExtractFolder%#$q&&%WindowsSystemDir%\msiexec.exe /a #$q%CoreMSI%#$q TARGETDIR=%ExtractFolder%\netfx_core_%SourceArch%\ /qn#$q /l %CoreMSI%.log"
  Echo,"MSIexec extracting %CoreMSI% exited with: %ExitCode%"
  If,Not,ExistFile,"%ExtractFolder%\netfx_core_%SourceArch%\%CoreMSI%",Message,"%CoreMSI% did not extract",INFORMATION,5
  ShellExecute,Hide,"cmd.exe","/C cd #$q%ExtractFolder%#$q&&%WindowsSystemDir%\msiexec.exe /a #$q%ExtendedMSI%#$q TARGETDIR=%ExtractFolder%\netfx_extended_%SourceArch%\ /qn#$q /l %ExtendedMSI%.log"
  Echo,"MSIexec extracting %ExtendedMSI% exited with: %ExitCode%"
  If,Not,ExistFile,"%ExtractFolder%\netfx_extended_%SourceArch%\%ExtendedMSI%",Message,"%ExtendedMSI% did not extract",INFORMATION,5
End
// *** NEXT TWO JUST SHOW TRANSFORMS EXAMPLE ***
//  ShellExecute,Hide,"cmd.exe","/C cd #$q%ExtractFolder%#$q&&%WindowsSystemDir%\msiexec.exe /a #$q%CoreMSI%#$q TARGETDIR=%ExtractFolder%\netfx_core_%SourceArch%\ TRANSFORMS=%LangID% /qn#$q"
//  ShellExecute,Hide,"cmd.exe","/C cd #$q%ExtractFolder%#$q&&%WindowsSystemDir%\msiexec.exe /a #$q%ExtendedMSI%#$q TARGETDIR=%ExtractFolder%\netfx_extended_%SourceArch%\ TRANSFORMS=%LangID% /qn#$q"
// *** DELETE ALL AND COPY FROM DOWNLOAD/EXTRACT FOLDER TO WORKBENCH USING ROBOCOPY ***
Echo,".....Ending ExtractMSI...",WARN
##
 
 
 
Regards
RoyM

  • pscEx likes this

#11 Elliot Labs

Elliot Labs

    Newbie

  • Members
  • 23 posts
  • Location:Utopia Planitia Fleet Yards
  • Interests:Computers, more specifically Systems Administration.
  •  
    United States

Posted 22 January 2015 - 03:21 PM

 

I'm not up to a tutorial, but I will share some snippets of my own code and experience.
 
just expanding the contents of .msi files, sometimes ends up with a big mess of files,
associated with alternative install modes etc, etc, (i.e.) Language, Locale, Architecture.
 
When using msiexec to extract the contents, the results end up more of what you might expect.
 
Also, there are other switches available to msiexec and also the .msi files themselves.
netfx_core_x64.msi /qn
 
When I retrieve all of my notes I will try to share them.
 
EDIT: Sorry, Just notice the LiveXP part
I also noticed that in my build is this:
************************************************************************************
C:\Win7PE_SE\Projects\LiveXP\Components\Core\2 Update\20050902_msi.script
//reg_add,0x1,"%reg%\ControlSet001\Services\MSIServer","Description","Installs, repairs and removes software according to instructions contained in .MSI files."
 
You might try a test and uncomment the line, and do a new build and see if that helps with .msi install.
 
 
 
Some Examples:
***********************************************************************************
This is simply expanding the contents of the .msi file using 7-Zip.
 
%ProgramMSI%="AccessData FTK Imager.msi"
ShellExecute,Hide,%Tools%\7z.exe,"x #$q%GlobalSupport%\Downloads\%ProgramFolder%\%ProgramMSI%#$q -y -o#$q%ProjectTemp%\TempExtractFolder\%ProgramFolder%#$q"
 
************************************************************************************
This uses the Host OS msiexec to extract the contents of the .msi
 
[ExtractMSI]
Echo,".....Starting ExtractMSI...",WARN
If,ExistFile,"%WindowsSystemDir%\msiexec.exe",Begin
  // *** Apply patch to CoreMSI ***
  ShellExecute,Hide,"cmd.exe","/C cd #$q%ExtractFolder%#$q&&%WindowsSystemDir%\msiexec.exe /a #$q%CoreMSI%#$q /p %KB2468871-v2-% /qn#$q /l %KB2468871-v2-%.log"
  Echo,"MSIexec applying patch to %CoreMSI% exited with: %ExitCode%"
  ShellExecute,Hide,"cmd.exe","/C cd #$q%ExtractFolder%#$q&&%WindowsSystemDir%\msiexec.exe /a #$q%CoreMSI%#$q TARGETDIR=%ExtractFolder%\netfx_core_%SourceArch%\ /qn#$q /l %CoreMSI%.log"
  Echo,"MSIexec extracting %CoreMSI% exited with: %ExitCode%"
  If,Not,ExistFile,"%ExtractFolder%\netfx_core_%SourceArch%\%CoreMSI%",Message,"%CoreMSI% did not extract",INFORMATION,5
  ShellExecute,Hide,"cmd.exe","/C cd #$q%ExtractFolder%#$q&&%WindowsSystemDir%\msiexec.exe /a #$q%ExtendedMSI%#$q TARGETDIR=%ExtractFolder%\netfx_extended_%SourceArch%\ /qn#$q /l %ExtendedMSI%.log"
  Echo,"MSIexec extracting %ExtendedMSI% exited with: %ExitCode%"
  If,Not,ExistFile,"%ExtractFolder%\netfx_extended_%SourceArch%\%ExtendedMSI%",Message,"%ExtendedMSI% did not extract",INFORMATION,5
End
// *** NEXT TWO JUST SHOW TRANSFORMS EXAMPLE ***
//  ShellExecute,Hide,"cmd.exe","/C cd #$q%ExtractFolder%#$q&&%WindowsSystemDir%\msiexec.exe /a #$q%CoreMSI%#$q TARGETDIR=%ExtractFolder%\netfx_core_%SourceArch%\ TRANSFORMS=%LangID% /qn#$q"
//  ShellExecute,Hide,"cmd.exe","/C cd #$q%ExtractFolder%#$q&&%WindowsSystemDir%\msiexec.exe /a #$q%ExtendedMSI%#$q TARGETDIR=%ExtractFolder%\netfx_extended_%SourceArch%\ TRANSFORMS=%LangID% /qn#$q"
// *** DELETE ALL AND COPY FROM DOWNLOAD/EXTRACT FOLDER TO WORKBENCH USING ROBOCOPY ***
Echo,".....Ending ExtractMSI...",WARN
##
 
 
 
Regards
RoyM

 

Nice! I will try this out when I have time. I just got my new mobo and am currently setting up my VPS server.



#12 RoyM

RoyM

    Frequent Member

  • .script developer
  • 420 posts
  • Interests:"Booting and Owning".
  •  
    United States

Posted 31 January 2015 - 03:20 AM

Adding some personal notes and additional info as promised, this is not the extent of my notes.

 

"Somewhere I have some really detailed notes while experimenting with .msi intergration into .scripts."

I will probably have to scour some of my older .scripts to find more details.

 

Anywho, here it is

 

***** Additional .msi notes ************************************************

 

Here are some tools to help with .msi files:
--------------------------------------------
 
 
MSIDIFF compares or decompiles Windows Installer Databases (MSI, MSM etc)
MSIDIFF is freeware to compare or disassemble Windows Installer databases (a "MSI to TEXT" utility). While it is a command line based tool, 
the installer creates shell extensions so that the decompile operations can be invoked by right clicking on a file in Explorer. 
The output is very easy to read and can be processed by my MAKEMSI tool or can be further processed via my PPWIZARD preprocessor. 
 
************************************************************************************************************************************
 
From: Universal Extractor\docs\msi_readme.txt
msi plugin v1.2 for Total Commander
installation:
 
- unzip the msi.wcx to your Total Commander installation directory
- choose the menu configuration - options
- choose the packer tab
- click the configure packer extension dlls button
- type msi as new extension
- click new type, and select msi.wcx
- click ok
- type msp as new extension
- select msi.wcx
- click ok
 
usage:
the plugin provides basic support for browsing and extracting from
msi (microsoft installer) database files.
note: some msi files don't contain any actual data. they only contain
references to external (mostly) cab files (which in turn are described
in another table of the msi file). those can be viewed with the normal
capability of Total Commander and may be on different volumes, in the
same directory (most likely) or elsewhere. the plugin just displays the
files actually contained within the msi file (as ole data stream). msi 
files which don't contain any actual data are displayed as empty. msi 
files may contain data of any type, but most of the time they just
contain one or more cab files.
 
update:
version 1.2 now also opens msp files (requested by some users). the same as
to msi files also applies to msp files with the addition, that the ole
streams contained in msp files don't have to be entire files, but can
only be patches. the plugin now displays all data streams contained in
the file (also on user request), whatever good it may do.
 
note:
if you receive an error message indicating that msi.wcx is not a valid
packer plugin (happens on older systems), then you most likely need 
to install the msi dlls on your system. you can get these free of
charge from microsoft:
 
written by:
alexander gretha
mailto:developer@chicken.sh
 
 
**********************************************************************************************************************************************************
 
Windows ® Installer. V 3.00.3790.2180 
msiexec /Option <Required Parameter> [Optional Parameter]
Install Options
</package | /i> <Product.msi>
Installs or configures a product
/a <Product.msi>
Administrative install - Installs a product on the network
/j<u|m> <Product.msi> [/t <Transform List>] [/g <Language ID>]
Advertises a product - m to all users, u to current user
</uninstall | /x> <Product.msi | ProductCode>
Uninstalls the product
Display Options
/quiet
Quiet mode, no user interaction
/passive
Unattended mode - progress bar only
/q[n|b|r|f]
Sets user interface level
n - No UI
b - Basic UI
r - Reduced UI
f - Full UI (default)
/help
Help information
Restart Options
/norestart
Do not restart after the installation is complete
/promptrestart
Prompts the user for restart if necessary
/forcerestart
Always restart the computer after installation
Logging Options
/l[i|w|e|a|r|u|c|m|o|p|v|x|+|!|*] <LogFile>
i - Status messages
w - Nonfatal warnings
e - All error messages
a - Start up of actions
r - Action-specific records
u - User requests
c - Initial UI parameters
m - Out-of-memory or fatal exit information
o - Out-of-disk-space messages
p - Terminal properties
v - Verbose output
x - Extra debugging information
+ - Append to existing log file
! - Flush each line to the log
* - Log all information, except for v and x options
/log <LogFile>
Equivalent of /l* <LogFile>
Update Options
/update <Update1.msp>[;Update2.msp]
Applies update(s)
/uninstall <PatchCodeGuid>[;Update2.msp] /package <Product.msi | ProductCode>
Remove update(s) for a product
Repair Options
/f[p|e|c|m|s|o|d|a|u|v] <Product.msi | ProductCode>
Repairs a product
p - only if file is missing
o - if file is missing or an older version is installed (default)
e - if file is missing or an equal or older version is installed
d - if file is missing or a different version is installed
c - if file is missing or checksum does not match the calculated value
a - forces all files to be reinstalled
u - all required user-specific registry entries (default)
m - all required computer-specific registry entries (default)
s - all existing shortcuts (default)
v - runs from source and recaches local package
Setting Public Properties
[PROPERTY=PropertyValue]
 
Consult the Windows ® Installer SDK for additional documentation on the
command line syntax.
 
Copyright © Microsoft Corporation. All rights reserved.
Portions of this software are based in part on the work of the Independent JPEG Group.
 
 
**********************************************************************************************************************************************************
 
Regards
RoyM


#13 Elliot Labs

Elliot Labs

    Newbie

  • Members
  • 23 posts
  • Location:Utopia Planitia Fleet Yards
  • Interests:Computers, more specifically Systems Administration.
  •  
    United States

Posted 31 January 2015 - 03:31 PM

Thanks for the info!

I am still neck deep in my VPS server so I might not get to working on an msi solution :(







Also tagged with one or more of these keywords: msi integration, request

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users