ClickOnce custom prerequisite problem with installation - visual-studio-2010

I have created custom prerequisite setup project for ClickOnce and it is among the other prerequisites in publish tab of the project. But when i try to install my app via ClickOnce(with setup button) it runs prerequisite setup, and asks if i want to install it. I click "install" and the following error appears:
The following package files could not
be found:
C:\Users\..\AppData\Local\Microsoft\Windows\Temporary
Internet
Files\Content.IE5\U2R49322\FontPrerequisite\setupfont.msi
When i launch the application-it installs it, but without prerequisite. What can cause the problem?

This is a wild guess, but I would assume that you've specified that the user should download the prerequisite from the vendors site. Open the Prerequisites dialog and select your prerequisite. Click on the option that states Download prerequisite from the same location as my application. (See the screen shot below)
This should bundle your prereq with your application deployment. Hope that helps.

Related

Where should I check for .net framework when building a windows installer?

I am really confused. What I want to do is check to see if .net 4.0 is installed. If it is not, then install it from our company's URL.
I noticed a Installation URL in the Property Pages associated with Prerequisites.
1) If I add a URL pointing to our company's URL, then select .net Framework 4 and select "Download prerequisites from the component vendor's web site" -- it tries to download it from Microsoft web site which I don't want.
2) If I select "Download prerequisites from the same location as my application", the build will fail if I don't have the dotNetFx40_Full_setup.exe in the same location as my install files
3)Then I noticed that I can also set the installURL in the Launch Conditions to point to our company's website and set the Version to .net Framework 4
Which is the preferred method? Prerequisites or Launch conditions?
Thanks!
It is usually better in prerequisites because the launch condition basically just prevents the install from proceeding. It's just a check in case somebody launches the MSI without running the setup.exe bootstrapper. The launch condition will give you a URL, but the customer then needs to download and install it. The prerequisites exe does it all for you.

Run a prerequisite silently along with application setup in visual studio 2010

I am trying to create a setup of my application along with all of it's prerequisites.
I want iTunes as prerequisite for my application, and want to install it silently along with my application. i.e. I want to install my prerequisite silently.
I have made bootstrap package for iTunes(now it is appearing in prerequisites list) and made by set up.
The set up is asking for installation of iTunes when it is run.
I want my iTunes set up to run silently along with the application setup.
Now it is showing dialog box :
"The following components will be installed on your machine:
[Component List] Do you wish to install these components? If you
choose Cancel, setup will exit. [Install Button] [Cancel Button]"
I am using Visual Studio 2010 install project (this is not an install shield project).
How to achieve this?
As far as I know, that message:
"The following components will be installed on your machine: [Component List] Do you wish to install these components? If you choose Cancel, setup will exit. [Install Button] [Cancel Button]"
is not from the setup.exe, or your MSI setup, so it must be coming from one of your prereqs like iTunes, but the component names are not shown so I've no idea which one. Either way, it looks like your silent install command line is in fact not silent. Don't assume that they are all the same.

Create an installer that requires installing other app in VS2010

I'm trying to create an installer in VS2010.
My situation is: I have 2 app, during installing a application, I need to check if the other app exists or not. If it exists, just install the first app, otherwise install both of them. How can I do this in VS2010. I've searched and find a solution here. But I don't know where I can put these codes.
Any instruction in details would be appreciated.
Thank you.
You probably will want to look into creating a Custom BootStrapper
From above link:
The Setup program is a generic installer that can be configured to detect and install redistributable components such as Windows Installer (.msi) files and executable programs. The installer is also known as a bootstrapper. It is programmed through a set of XML manifests that specify the metadata to manage the installation of the component.
The bootstrapper first detects whether any of the prerequisites are already installed. If prerequisites are not installed, first the bootstrapper shows the license agreements. Second, after the end-user accepts the license agreements, the installation begins for the prerequisites. Otherwise, if all the prerequisites are detected, the bootstrapper just starts the application installer.

Including a runtime (vcredist_x86.exe) as part of an installer

I need to include a runtime as part of a project installer.
I was having trouble including it, as an error saying "an installation is already in progress" was appearing, due to the fact that I was essentially trying run an msi from within an msi.
I managed to get over this by including it in the "OnAfterInstall" event, however it appears now that it is not being installed on upgrades, only on fresh installs.
Can anyone offer any advice?
Thanks
You don't specify what version of the Visual C++ Runtime, but this may work:
Visual Studio Installer Projects provide a prerequisites setting which is pre-populated with a list of common components. These are .mst files, so they can be merged into your installer. To reach the prerequisites screen, right-click your installer project -> Properties -> Prerequisites. Check the appropriate box in the list and change the option at the bottom to include the prerequisite in the setup program.
apparently you should add it as a "merge module" in your MSI http://blogs.msdn.com/b/vcblog/archive/2007/10/12/how-to-redistribute-the-visual-c-libraries-with-your-application.aspx

How does clickonce installer installes prerequisites that are not mentioned on the prerequisites list

I want to package DirectX 9 with my installer as it is necessary for my software to work.
Can you please tell me how can i do that?
I tried doing this thing. I went to the heading under prerequisite tab, download prerequisites from the following location and pasted the url for DirectX, which is this.
When i published it, it gave me error:
Cannot publish because a project failed to build.
Item 'Windows Installer 3.1' is required by '.NET Framework Client Profile', but was not included.
The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFx35Client\DotNetFx35ClientSetup.exe' in item '.NET Framework Client Profile' can not be located on disk. See Help for more information.
I am working on my virtual machine which does not have .NET 3.5 so that my installer installs it itself if it's not in my machine.
Your workaround is failing because that URL is universal for all the prerequisites, not just one, and thus your other prerequisites are failing to load.
It looks like you need to add a custom prerequisite -- I've never had to do it myself, but instructions are here.

Resources