Solved

Create self-extracting installer from 3 pre-existing windows MSI files

Posted on 2010-08-16
15
975 Views
Last Modified: 2013-12-01
Greetings and thank you for a moment of your time,

THE REQUEST:
I've got 3 pre-existing MSI files, which I did not create.  I just want to chain them into a compressed self-extracting archive, which then kicks them off automatically in the correct order.  Ideally, I just email them the link, and it's pretty automated from there, with the exception of the Wizards resultant from the MSI packaging.

FORMAT:
This is unimportant.  The single file I send them a link to, might as well be an exe, zip, or whatever, as long as it will self-extract automatically on Windows XP Professional, with as few clicks as possible, and begin the installation automatically (of the 3 MSI files).

CAVEATS:
I'm not allowed to deploy these MSI's via GPO (my preferred method, and much easier too!), so in the meantime, I'm trying to find a simple method to avoid confusing my customers, or frustrating them.  Fewer mouse clicks is the goal here.  Having them download them individually, then find the location, and kick them off one at a time, is like pulling teeth.

TOOLS:
I've got Winrar, but I'm not opposed to Alzip, 7-zip, Inno, etc., whatever is easiest and works.

THANK YOU :-)
0
Comment
Question by:ksuchy
  • 9
  • 5
15 Comments
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 33447046
I would create SFX file in Winrar, with the 3 MSI's inside, plus vbscript or .cmd that would run the msi's in the correct order, and since you don't want the dialogs, with switch /qb . You then specify that script in SFX options under "run after extraction".
0
 
LVL 7

Expert Comment

by:deisrobinson
ID: 33447047
0
 

Author Comment

by:ksuchy
ID: 33448392
Deisrobinson,  
Thank you for the suggestion, I will keep that on the burner for now.

Vadimrapp1,  
I've never included a vbscript like that before, because I've never put multiple files in like this, which need to be kicked off in order (I'm assuming you've used vbscript in similar cases).  Can you give me a link or some of the basic lines of vbscript I'd use in that scenario?  Would the script need to kick off one of the msi files, then wait somehow, for some amount of time, or maybe a prompt, before moving to the 2nd, and then 3rd?

thanks so much!,
~k
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 33448490
See article "Run Method (Windows Script Host)" ( http://msdn.microsoft.com/en-us/library/d5fk67ky%28VS.85%29.aspx ) for details; it has an example. As you can see, there's parameter bWaitOnReturn, so each line will wait for completion before moving to the next one.

Each command to run would be msiexec.exe /qb /i package1.msi .

The command to run vbscript itself would be wscript.exe myscript.vbs (run wscript /? to see all parameters).

With Installer 4.5, there's also an interesting possibility to run all 3 installations as one transaction, so if one fails, others rollback as well. But creating the script providing that is more involved.
0
 

Author Comment

by:ksuchy
ID: 33449884
Ok!  I've got another ticket to help me if I run into problems with the VBscript now (I'm so lucky you two showed up to help me!)

Baring some problem with the script or my tests, I'll try to get this working (tested on VM's), and then report back soon (2 days max).

Thanks Vadimrapp1 & Deisrobinson so much!
0
 

Author Comment

by:ksuchy
ID: 33451391
It doesn't seem to work with any variant of %dir% no matter how many quotes (including none at all).  Note, that I also attempted other paths, such as: %HOMEPATH%\My Documents

0
 

Author Comment

by:ksuchy
ID: 33451393
I also just attempted to run the vbscript directly -- aka, from a prompt:

 \My Documents>wscript.exe installer.vbs
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 40

Accepted Solution

by:
Vadim Rapp earned 500 total points
ID: 33451509
Well, I just double-checked: put trivial installation package https://filedb.experts-exchange.com/incoming/ee-stuff/7973-test.MSI in %temp%, then ran the following script:


set s=createobject("wscript.shell")
s.run "msiexec /qb /i ""%temp%\test.msi""",1,true
s.run "msiexec /qb /x ""%temp%\test.msi""",1,true



and it correctly installed it, then uninstalled.
0
 

Author Comment

by:ksuchy
ID: 33451615
triple quotes.  that was it!

s.run "msiexec.exe /qb /i ""%temp%\test.msi"",1,True" << original

I was modifying the quotes in all possible ways, other than the correct way:
s.run "msiexec /qb /i ""%temp%\test.msi""",1,true

I'll retry the exe in the morning.

thanks :-)
0
 

Author Comment

by:ksuchy
ID: 33459395
I've got one last question.  
When I'm at a cmd prompt, it doesn't seem to make any difference if I type:

>wscript.exe installer.vbs

or if I type

>installer.vbs

why type the wscript.exe?
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 33459481
To account for (very unlikely but not entirely impossible) case when filetype .vbs is associated not with wscript.exe but something else. In programming, the recommended practice is to always specify explicitly whatever can be specified.

Actually, I'd say, it's recommended not only in programming. The less assumptions, the better.
0
 

Author Comment

by:ksuchy
ID: 33460597
Just an FYI:

My reason for asking about the invocation of the vbscript by the use of (tell me if I say this the wrong way) by handing off the vbscript to the wscript object intentionally, is this:

In a sleep-deprived stupor last night (about 2 am), I found that I could compile the vbscript into an .exe and then create a nice little wizard that actually looks like a traditional installer using either:

http://www.bersoft.com/easysetup/
or
http://www.ssesetup.com

So I tested this, and sure enough, it works!   These two programs above work for me (non-profit), and and far more simple than NSIS or INNO.

I'm was wondering if I should go back and try to change the file association in my test VM, for the vbs filetype, and then rerun.   I probably will.  But I already think (now) that this file name extension won't affect the vbscript being executed as part of my install exe, because when the vbs is compiled into an exe, the wsh object model is simulated somehow, as if all the classes and types are linked or pulled in somehow, and a sort of wsh is actually being used to run the vbs, in the same way that it would if I called wscript.exe from the command prompt as you have suggested I do.

I haven't learned this much in a single Q&A thread, in my entire life.  

Thanks so much!

0
 

Author Comment

by:ksuchy
ID: 33460605
I should clarify:  I'm still using your vbscript (thank you).  But now I'm using a nice install wizard with a "branded" splash screen I made, my own organizational icon, license agreement, readme, etc., all in a single .exe.  

I'm going to do one more test tomorrow.  
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 33460947
Actually, sfx in winrar that you mentioned in the very beginning also supports branded icon and license. Readme probably might be launched in the end either by the installation, or by yet another lince in the script.
0
 

Author Closing Comment

by:ksuchy
ID: 33485593
worked great, thanks so much!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Installations often have prerequisites, such as “Microsoft .Net framework is required for this product”. The usual implementation in MSI installations is system search for a particular registry setting representing the required prerequisite, followe…
Good afternoon all, We are running a VM infrastructure on a clustered ESX environment with two DELL R710's.  One of our IT Application Support Engineers contacted me and asked if it was possible to extend the partition of a certain Windows 2003 S…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now