PDA

View Full Version : Run Command Line question



NewsArchive
06-29-2012, 12:45 AM
I am using the Run Command Line script function.

All I want to do is have the OS display a PDF file.

I thought I could use %CURDIR%myfilename.pdf

There is not a lot of documentation on this function.

What do I need to do if I want to launch a PDF or AVI file.

Mike

NewsArchive
06-29-2012, 12:45 AM
Mike,

> I am using the Run Command Line script function.
>
> All I want to do is have the OS display a PDF file.
>
> I thought I could use %CURDIR%myfilename.pdf
>
> There is not a lot of documentation on this function.
>
> What do I need to do if I want to launch a PDF or AVI file.

First of all, I would not use %CURDIR%. %CURDIR% is the currently active
folder and might not be the folder your installer is running in (when you
use the variable).

And "Run Command Line" is no a good idea because what you would like to do
is to open a document with a program that is registered to a specific file
extension. In Windows you have to use ShellExecute to handle this.

So just do the following and you are done:

1. Retrieve the pathname of the installation currently executing
2. Use Run Program with the ShellExecute option enabled to launch the
program that is associated with your .PDF extension.

Set Variable %INST_PATH% to FUNCTION:Get System Info(Installer Path Name)
Run Program %INST_PATH%\myfilename.pdf (Always Install) [ShellExecuteEx]

Friedrich

NewsArchive
06-30-2012, 12:54 AM
Thank you again for your advice Friedrich. It is invaluabnle for such a
capable product!

Michael Brooks

NewsArchive
06-30-2012, 12:54 AM
> Thank you again for your advice Friedrich. It is invaluabnle for
> such a capable product!

You are very welcome, Mike :-)

Friedrich