Viewer configuration options
No main viewer
Other viewer checks
Home page
  • Freeware instructions
        Free download
        Example AUTORUN.INF
        Command prompt

  • Retail features
        Retail instructions
        ShRun.INF parameters
        More files - Menu
        Screen options
        Viewer checking
        Example ShRun.INF

  • AutoRun basics
  • HTML CD-ROMs

  • Version details
        Readme

  • Licence and pricing
        This link is online on the Internet Buy now for US$90

  • Email sales/support
  • Introduction

    If you are using ShellRun to show an HTML web page on your CD, almost all users will have a browser installed to view the page.  However, if you are trying to show a PDF file for example, there is no guarantee that Adobe™ Reader (or equivalent) is installed on the user's computer.

    The retail version of ShellRun can help you cope if no viewer is available in two cases:

  • No viewer for your main file
  • No viewer for other file types
    Note that the user may have to reinsert the CD after a viewer has been installed.

    If you have a viewer program available then put its installation program on your CD - if you are allowed to distribute it. To distribute Adobe™ Reader, see here: Adobe Reader - Download Adobe Reader for distribution.

  • Background

    The jargon is that a filename extension is associated with a file type, a viewer and a viewer executable program by Windows.  To see the complete set of file viewer associations on your computer do this in Windows Explorer: select menu Tools+Folder options then tab File types.  (Do not change these settings unless you know what you are doing!)  Here's a typical core set:

    File extension File type Viewer Viewer executable
    .BMP Bitmap Image Windows Picture and Fax Viewer .....\shimgvw.dll
    .DOC Microsoft Word Document Microsoft Word .....\WinWord.exe
    .HTM, .HTML HTML Document Internet Explorer .....\iexplore.exe
    .MOV QuickTimeMovie QuickTimePlayer .....\QuickTimePlayer.exe
    .MP3 Winamp media file Winamp .....\winamp.exe
    .MPEG Movie File (MPEG) Windows Media Player .....\wmplayer.exe
    .PDF Adobe Acrobat Document Adobe Reader .....\AcroRd32.exe

    It is important to note that a filename extension may be associated with a different viewer on other computers.  So the .HTM extension would be associated with Netscape Navigator if the user has chosen this program as their default browser.

    Also remember that not all viewers are equal.  Even though you might expect .DOC to be associated with Microsoft Word, basic Windows systems will in fact associate this extension with Windows WordPad.  Your Word document might well not display correctly in WordPad.  (Others may have WordViewer installed, which might well be OK.)

    Finally, and crucially, some users may not have a viewer installed at all, eg .PDF will not have any association if Adobe™ Reader (or equivalent) is not installed.

    Viewer browser

    The retail Viewer Browser program helps you determine the viewer associated with a filename extension on the current computer.  You can also launch the viewer to show a file or URL.

    Run Start+All Programs+ShellRun+Viewer browser.  Enter a filename or browse to find a file.  Then press Lookup.  If a file association exists, then the File type, Viewer executable and Viewer version are listed below.  Lookup does not work for URLs.

    Press View file/URL to open the given file or URL in its default viewer.  This does work for URLs.

    Screenshot of retail ShellRun Viewer Browser application


    No main file Viewer

    ShellRun can help in two ways to check the viewer for your main file (ie the Filename parameter in your ShRun.INF).
    • If no viewer installed, then prompt to install a viewer
    • If the viewer is out of date, then prompt to install the latest version
    Default action
    1. If no viewer is installed then ShellRun by default displays this message:
      You need to install a suitable viewer program for this file type
      (Reduced) screenshot of retail ShellRun when a PDF viewer is not available

    Custom message and handling
    1. You can change the message that is shown by setting the NoViewerMsg parameter appropriately.

    2. You can say how to install a viewer by setting the NoViewerCmdClick parameter.  ShellRun adds an Install Viewer button to the popup window, eg:
      [Info]
      ...
      NoViewerMsg=To view this CD you need to install Adobe Reader
      NoViewerCmdClick=http://www.adobe.com
      In this case, ShellRun displays "Starting http://www.adobe.com" if the user clicks on the Install Viewer button.

    3. If you want to start an installation immediately (ie without using the Install viewer button) then set the NoViewerCmd parameter instead.  (If desired, you can set both NoViewerCmd and NoViewerCmdClick.)

    4. If you have provided a viewer installation program on your CD, then you can run the installation program directly, eg:
      [Info]
      ...
      NoViewerMsg=To view this CD you need to install Adobe Reader
      NoViewerCmdClick=reader\rs405eng.exe
      If you run an installation program then ShellRun tries to show your original file after the installation program has finished - If you do not want this to happen then set the NoViewerCmdClickRetryShow parameter to "off". This applies for both NoViewerCmd and NoViewerCmdClick.

      Sometimes ShellRun cannot re-show the original file immediately after a viewer installation program has run - possibly because the viewer installation has not completed. In this case (and only if NoViewerCmdClick is being used), ShellRun changes the Install Viewer button to a Re-show button. The text for this button comes from the and NoViewerCmdClickRetryText parameter which defaults to "Click here when viewer installed".

      Always check that you are allowed to distribute the installation program on your CD.

    5. You can change the text of the Install Viewer button by setting the NoViewerCmdClickText parameter.  And you can change the message that is displayed after clicking on this button by setting NoViewerCmdClickMsg, eg:
      [Info]
      ...
      NoViewerMsg=To view this CD you need to install Adobe Reader
      NoViewerCmdClick=http://www.adobe.com
      NoViewerCmdClickText=Go to the Adobe web site to get Reader
      NoViewerCmdClickMsg=Showing Adobe web site...

      Screenshot of customised retail ShellRun when a PDF viewer is not available

    6. In some cases, you may want to specify parameters to your viewer installation program.  Do this using the NoViewerCmdClickParam parameter (or NoViewerCmdParam if the installation is to start immediately). You can specify any text for these parameters, but %1 is replaced by the Filename.
      [Info]
      ...
      filename=intro.xxx
      NoViewerMsg=To view this CD you need to install a viewer
      NoViewerCmdClick=ViewerInstall.exe
      NoViewerCmdClickParam=/run %1
      In this example, if a viewer for intro.xxx is not available, and the user clicks on the Install Viewer button, then ViewerInstall.exe is run with parameter /run intro.xxx

      By default NoViewerCmdClickParam and NoViewerCmdParam are empty.

    Viewer version checking
    Suppose a PDF viewer is installed, say Adobe Reader version 3.  However the PDFs on your CD use features that are only supported by Adobe Reader 4 or later.  ShellRun can also check the version of a viewer and prompt the user to update it.

    Windows program version numbers are 4 numbers (each in the range 0 to 65535).  For example, the Adobe Reader viewer 5.01 is in file AcroRd32.exe which has file version 5.0.1.329.  The numbers to the left are most significant.

    You can use the ShellRun Viewer Browser to determine the viewer and viewer version for a file type on your computer.  Alternatively, locate the viewer program using Windows Explorer.  Right-click on the program icon and select Properties then the Version tab.  The file version number is listed at the top.

    1. To check the version of the installed viewer, set the NoViewerVersion parameter to the required version number.  Even though the latest version of the viewer might be say 5.0.1.329, only specify the minimum viewer required, eg 4.0.0.0.
      [Info]
      Filename=info.pdf
      ...
      NoViewerVersion=4.0.0.0
      NoViewerMsg=To view this CD you need to install Adobe Reader version 4 or later
      NoViewerCmdClick=http://www.adobe.com

    2. As mentioned earlier, different programs may be used as the viewer for a particular file extension.  For example, a user may be using Adobe Acrobat rather then Adobe Reader.  If you want to ensure that you only prompt for installation for the Adobe Reader case, then specify the Adobe Reader viewer executable filename (AcroRd32.exe), after the version number and a comma, eg:
      [Info]
      ...
      NoViewerVersion=4.0.0.0,AcroRd32.exe
      NoViewerMsg=To view this CD you need to install Adobe Reader version 4 or later
      NoViewerCmdClick=http://www.adobe.com
      If the user has the full Acrobat installed, then the program filename is Acrobat.exe so the version check will not be carried out by ShellRun.  If you also want to check the Acrobat case, then use an Additional Viewer check, below.

    Additional Viewer checks

    Suppose you get ShellRun to start your CD by showing a web page, but your CD also contains other types of content, eg PDF files.  ShellRun can check up to 10 other viewer types and prompt the user to obtain a suitable viewer program.

    ShellRun only checks for the additional viewers after it has shown the main file successfully.

    If an additional viewer needs to be installed, the ShellRun popup window appears and stays on screen for the user to see your message.  If more than one viewer is missing, ShellRun only tells the user about the first.

    1. To check for an additional viewer, you must set each ViewerFileN parameter to the path to a file of that type.  Always start with ViewerFile1, then use ViewerFile2 etc. up to ViewerFile10.

      For each ViewerFileN parameter, you must set the corresponding ViewerMsgN parameter.  For example, you could simply show a message stating that a suitable viewer needs to be installed.

    2. More usefully, you could also set the corresponding ViewerCmdClickN parameter to the file to show if the user now clicks on the Install viewer button.  If you want, you can also set ViewerCmdClickTextN and ViewerCmdClickMsgN to change the Install viewer button text and post-click message.

      This example checks for .PDF and .MOV file viewers and suggests to the user that they go to the appropriate web site to get a viewer:

      [Info]
      ...
      ViewerFile1=pdfs\afile.pdf
      ViewerMsg1=To view this CD you need to install Adobe Reader
      ViewerCmdClick1=http://www.adobe.com
      ViewerCmdClickText1=Go to the Adobe web site to get Adobe Reader
      ViewerCmdClickMsg1=Showing Adobe web site...
      
      ViewerFile2=video\afilm.mov
      ViewerMsg2=To view this CD you need to install the Apple QuickTime player
      ViewerCmdClick2=http://www.apple.com/quicktime/download

    3. If you want to start an install or view a web site straight away (ie without the Install viewer button), then set the ViewerCmdN parameter.  (Both this and ViewerCmdClickN can be used.)

    4. As above, you can also check the version number and optionally the viewer executable filename.  This time, use the appropriate ViewerVersionN parameter, eg:
      [Info]
      ...
      ViewerFile1=pdfs\afile.pdf
      ViewerVersion1=4.0.0.0
      ViewerMsg1=To view this CD you need to install Adobe Reader
      ViewerCmdClick1=http://www.adobe.com
      

    5. Different programs may be used as the viewer for a particular file extension.  For example, a user may be using Adobe Acrobat rather then Adobe Reader.  Add the appropriate viewer program executable filename to the ViewerVersionN parameter.

      The following example checks the version of the full Acrobat (which has executable filename Acrobat.exe).  If only Acrobat version 4 is installed, then ShellRun will suggest that Acrobat Reader 5 is installed.

      [Info]
      ...
      ViewerFile1=pdfs\afile.pdf
      ViewerVersion1=5.0.0.0,Acrobat.exe
      ViewerMsg1=Your version of Acrobat is out of date.  Please install Acrobat Reader 5.
      ViewerCmdClick1=http://www.adobe.com
      ViewerCmdClickText1=Go to the Adobe web site to get Adobe Reader
      ViewerCmdClickMsg1=Showing Adobe web site...

    6. As above, you can set ViewerCmdClickParamN and ViewerCmdParamN parameters to specify parameters to pass to the relevant command.

      You can specify any text for these parameters, with %1 is replaced by the ViewerFileN.

    ShellRun Home Last modified: 2 September 2005 ShellRun online