Launching released notes (pdf) and application after the installation

VirginiaS's picture

Normal
0

false
false
false

MicrosoftInternetExplorer4

st1\:*{behavior:url(#ieooui) }

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}

Hi Everyone,
I followed second method from this side: https://kb.altiris.com/display/1n/articleDirect/in....
Unfortunately, when the application is launched from Finish button the installation does not exit unless I am closing the application that I just launched. 
Is anything that I did not set properly, or this is the way the installed application can be called?
I would like more to have to check boxes: one with "Launch Application" and the other with "Launch released notes" of the application and when Finish button is pressed for exiting whatever is checked from the above check boxes to be executed while the installation exits.
Can anyone help me with this setup?
Thank you,
Virginia

EdT's picture

Two things

1. The Execute Program from Installed Files custom action has a Properties tab. Within that tab, chances are that you have the default "Synchronous" Processing option set. Change this to async, no wait, and your problem will be solved.
2. What happens if Acrobat Reader is not present?  Perhaps you should include a search for AcroRd32.exe and then use the "Execute Program from Destination" custom action instead, to call AcroRd32.exe and pass the path of your PDF release notes as an argument to the executable.

Alternatively, consider writing your release notes in a format natively supported by a basic windows install, eg RTF.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

VirginiaS's picture

Thank you very much for first

Thank you very much for first part of the problem, works very well.
For the second, how could I search for AcroRd32.exe?

Virginia

VirginiaS's picture

Actually I setup a search for

Actually I setup a search for ACRoRd32.exe inthe System Search page, setting it to "Search for file: return containing directory only" to C:program Files searching directory 5 depth the file called AcroRd32.exe. Then when I press a button for launching the released notes(not Finish) I set the button to event DoAction with Execute Program From Destination, calling this action in execute immediate  if the button is pressed.

VirginiaS's picture

I am sorry, I forgot to add

I am sorry, I forgot to add that it does not work the way I described before.

Virginia

EdT's picture

System Search

System Search is an action which runs early on in the UI and Execute sequences, so you need to grab any result and save it in a public property you can access at the end of the install.

Much simpler to implement, however, is a registry read. Windows uses file associations to launch files with defined extensions like PDF
If you look up .PDF in the HKCR hive of the registry, it will tell you that this links to AcroExch.Document. By scrolling down to this entry in HKCR, you will find this key:

HKEY_CLASSES_ROOT\AcroExch.Document\Shell\Open\Command

In that key you will find the path to AcroRd32.exe.  You will need to do a bit of parsing to remove the "%1" from the end of the string, but that's quite trivial with vbscript.
If this entry does not exist, then you can also report that Adobe Reader should be installed and exit cleanly from your app.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

VirginiaS's picture

I want to find the shortest

I want to find the shortest way to this feature for opening the Released Notes.
My company provides the customer with computer equipped with Acrobat reader, so the command AcroRd32.exe automatically opens the reader then I have to write the path to the released notes.
What is difficult for me now is how to defined the event for the button that is going to launch the command line: AcroRd32.exe "Path to released notes" Is this enough to launch a pdf?

Thank you,
Virginia

EdT's picture

Try it

As each customised operating system build is different, I cannot answer your question definitively.
If you are supplying standardised systems then the path to acrord32.exe should be identical in all machines and you can try hard coding the full path.
I was trying to offer a solution that should work with any configuration and also give you a mechanism for reporting if no Acrobat Reader is found.
However. if you are only targetting a customised environment that you have control over, then this should not be an issue.
Why not just try it?

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

VirginiaS's picture

Hi Ed, I tried to search the

Hi Ed,
I tried to search the registry as you said in your previous email. I created a propertie named ADOBESEARCH, I setup System Search with your suggestion returning into that propertie the command that was searched, I put a text box on last screen to see the return of that search and I got nothing. Did I do anything wrong?

Virginia

EdT's picture

Sorry, perhaps I was not clear enough...

The registry location I quoted:
HKEY_CLASSES_ROOT\AcroExch.Document\Shell\Open\Command

...is specific to Acrobat Reader and does not require a system search. All that is required is a custom action to read the default setting in that key, which will look like this for a default install:

"C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe" "%1"

So all you have to do once you have retrieved this value, is to parse it to remove the "%1" at the end, and you are left with the exact path of acrord32.exe.

If you are providing these machines already configured with a default Acrobat Reader install, and your application will not be used on any other machines, then it is even easier - you can just hard code the path to AcroRd32.exe as it will always be the same.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

philbenson's picture

Have you considered

just using shell execute from a CA? This will launch the pdf with the (default) PDF viewer on the target system (which does not have to be Adobe Reader these days) and let the OS handle it? If there is no reader installed, then the end user will get a typical, what do you want to open this file with...

As EdT has already stated, using the Aysnc No Wait will do the job.

Cheers
Phil