0

I've got a visual studio deployment project and would like to add an option to view a readme file from the final screen.

So basically there would be a link or checkbox that the user can select if they want to view the readme.

Does anyone know of an easy way to do this?

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
tjjjohnson
  • 3,270
  • 4
  • 31
  • 33

2 Answers2

1

I know it's perhaps a bit late, but I thought it would be helpful for anyone else who needs to solve this problem.

Visual Studio Setup and Deployment projects do not have a build in option to add a view readme check box to the end screen, however there is a way to do it.

Step1: As answered by @Peter Kelly at this question How do I launch an application after install in a Visual Studio Setup Project

you need to visit http://blogs.msdn.com/astebner/archive/2006/08/12/696833.aspx and grab the jscript file. This script adds a checkbox to the final screen of the installer and allows an exe/script to be run when the finish button is clicked.

Step 2: Create either a script file or as I did a small C/C++ executable that launches the file you want e.g. a text file, chm help file, pdf file (but any file can be opened)

Sample code for C++:

ShellExecute(0,
         L"Open",
         "FileName",
         NULL,
         NULL,
         SW_MAXIMIZE);

I passed the install location and the file name as arguments to the program by altering the JScript file as shown below...

sql = "INSERT INTO `CustomAction` (`Action`, `Type`, `Source`, `Target`) VALUES ('VSDCA_Launch', '210', '" + fileId + "', '[ProgramFilesFolder][Manufacturer]\\[ProductName] [ProductVersion]\\Documentation\\Readme.chm')";

In order for the exe program to remain unseen I created the program as a Win32 console app and then changed it in the Visual Studio project settings under Linker->System to Windows (/SUBSYSTEM:WINDOWS). (You will need to change int main to WINMAIN).

This now enables a check box on the finish screen, which will launch the file you desire.

Community
  • 1
  • 1
TomP89
  • 1,420
  • 3
  • 11
  • 29
0

Open the User Interface Editor. Right-click on the Install-Start node and selectAdd Dialog. Then you can position the dialog the way you want. The dialog can be configured with the property window and accepts a rich text file that is displayed. I see no reason why it would not accept a link in the rich text file.

Stefan Egli
  • 17,398
  • 3
  • 54
  • 75