Solved

Executing files from MSI

Posted on 2011-03-08
2
621 Views
Last Modified: 2012-05-11
Hi guys,

This is my first experience working this in depth with MSIs and below is the problem that I'm running into. I'm not finding much resolution for the error message 1721, so I'm hopeing someone here can help..

I am trying make the MSI launch Internet explorer browser on the users screen and display at statuspage.html that I have created and is hosted on my server.  I have added a type 51 CA to set a property value, then a type 50 in my MSI to call iexplore.exe and lauch a status page(Html) on that's hosted on my server via internet explorer on the users screen after the installation is complete.

I have read many pages about this and never seem to see any clear resolutions or there is very limited information about it.  Using the CAs I have added, I am able to successfully launch notepad.exe or cmd.exe etc..  basically any Exe thats listed in the c:\windows directory.  I am not able to launch Iexplore.exe from it's parent directory "C:\program files\Internet Explorer\iexplore.exe.  I get error 1721 which from what I can tell is an error with the command I'm using.  Here is the excerpt from the XML.

"
<row>
      <td>SetPropertyStatusPage</td>
      <td>51</td>
      <td>StatusPage</td>
      <td>"[ProgramFilesFolder]Internet Explorer\IEXPLORE.exe"</td>
</row>
<row>      
      <td>InvokeLaunchStatusPage</td>
      <td>50</td>
      <td>StatusPage</td>
      <td>IExplore.exe http:\\statuspage.html</td>
</row>

I also have these 2 CAs listed as the 2 last tasks in the installExecuteSequence Just before finalizeinstallation so they are properly sequenced.

I have tried adding the internet Explorer directory in the system environment variables and have tried directing the MSI to the Internet explorer directory.  both unsuccessfully.  

I did notice however, If I copy Iexplorer,exe to the C:\windows directory, I am able to launch he browser with the specific page(statuspage.html).

How is the c:\Windows folder and the %Programfiles%\Internet Explorer\Iexplore.exe directories treated differently by the MSI or by windows?

What Am I missing here?  Also, how am I supposed to set the CAs to run in Deferred mode in XML formatting?

thanks
0
Comment
Question by:krstiles
2 Comments
 
LVL 40

Accepted Solution

by:
Vadim Rapp earned 500 total points
ID: 35073957
> How is the c:\Windows folder and the %Programfiles%\Internet Explorer\Iexplore.exe directories treated differently by the MSI or by windows?

c:\windows is usually part of the system Path, so any program there can be called by name. Program Files is not.

You can refer to environment variables using information from the article "Formatted" from Installer SDK. In this case, [%ProgramFiles] will work.

However, all this is probably what you don't want to do. One reason is that Internet Explorer may be not user's default browser. Then there also may be differences on 64-bit systems. It's better to invoke the URL directly, as if it was run from Start/Run, and let the system handle it. To do this, you can put custom action type 38, "run vbscript from embedded code", with the code like

CreateObject("WScript.Shell").run "http://www.experts-exchange.com"

That will do it.

Another thing you probably don't want to do is put this in the execute script. Execute script is supposed to run already without user interaction. Also, the user can deploy the package with switch /q, expecting it to be "quiet", and he won't be happy if your custom action still pops up. The right way to do it is to create the above custom action outside of any sequence at all, but instead specify it as one of the events linked to the button "Finish" on Exit Dialog, complete with some conditions (was it installation, uninstallation, or maintenance, etc.)

0
 

Author Closing Comment

by:krstiles
ID: 35074682
Thank you very much.  I was looking at using shell script, but never thought to use VB imbedded.. leaning everyday!
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

Suggested Solutions

Title # Comments Views Activity
oracle query help 18 99
Counting documents in a Domino View 3 66
Windows 10 new laptop initial install restart 7 33
Changing Antivirus for Corporatre Network 11 36
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
A short article about problems I had with the new location API and permissions in Marshmallow
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

863 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

23 Experts available now in Live!

Get 1:1 Help Now