I want to add prerequisites to my Click Once application. Here is the problem. The program is in a server and clients install the application from the specific URL. I want to auto install the prerequisites (for example, Crystal Report Viewer) when the user first downloads and installs it, how could I do that?
I'm using C# Windows Forms and .NET Framework 4.0
You need to create a prerequisite first. The prerequisites that are shown in Visual Studio are in the following location
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\Packages
You can create a Product Manifest through this tutorial
Put it along with other bootstrapper packages.
Once this is done, you can select that prerequisite in your prerequisites window in publish settings and give the location from where you want the user to download it.
Here is a complete tutorial for creating Localized Bootstrapper Package.
There is a tool called Bootstrap Manifest Generator. This Code Project article is a complete tutorial for using this tool. I think this tool is not available from Microsoft directly any more.
Related
Is it possible to create an installer where the user must install 'x' software before continuing with the installer? For example, if the user does not have the required software to use my own software, the installer will guide them through the set up and download the required software and then proceed to install my software as the final step?
I have never created an installer so I have no idea if this is possible.
Is it possible to create an installer where the user must install 'x'
software before continuing with the installer?
Best approach to handle this requirement is to create a Bootstrapper package and add required software as a prerequisite for the main application installer. First you have to install the bootstrapper manifest generater tool from the link i have provided below. Tool will autogenerate necessary manifest files. You have to copy these files to the following folder(Visual Studio2010) C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages.
Once thats done go to your Application deployment project > Properties > Prerequisite There you will see your prerequisite software as one of the prerequisite option. Just select that and create the MSI. Now when you run the Setup.exe of your application it will first check if the prerequisite software package is installed in the target machine if so it will directly install your application otherwise it will first install the prerequisite component and then install your application.
MSDN: The bootstrapper first detects whether any of the prerequisites are already installed. If prerequisites are not
installed, the installation begins for the prerequisites. Otherwise,
if all the prerequisites are detected, the bootstrapper just starts
the application installer.
Creating Bootstrapper Packages
Bootstrapper Manifest Generator
As AccessDenied said, using a bootstrapper is the best option. Right now the best and most powerful free bootstrapper from the industry is available in Wix. It integrates with VS so you can have the setup project directly within your solution, or as a part of your automated build.
i am using VS 2010 and i am having trouble with clickonce deployment.
My goal is to Distribute application on DVD for users without internet connection to be able to install it. So it needs to include full installer of .NET framework 3.5 Client profile.
However, i am unable to achieve this.
From VS 2010 i choose publish wizard:
Specify location to publish this applicaton:
C:\ something\ something - this folder i will burn later to CD
How will users install application?
From CD{DVD
the application will check for updates from following location:
http://13874.w74.wedos.net/
And that is it, Publish wizard ends here.
So i create some aditional options:
Options->deployment
-Enable autorun for CDs
-Disable creation of publish.htm page
If i publish app, it is deployed to specified folder on my disk and can be installed from there.
But how do i include offline version of .net framework installer (I am Targeting .NET Framework 3.5)?
Thank you.
I managed to found solution for part of my question - how to include offline installer for .NET Framework 3.5. However, second part of my question - how to manage updates remains unanswered.
How to include .NET Framework offline installer for 3.5:
Under prerequisites (Properties->Publish->Prerequisites) make sure you have .Net framework 3.5 SP1 checked
Check radiobutton "Download from same location as my application" in lower part of prerequisities dialog.
Download .NET 3.5 full redistributable here http://go.microsoft.com/fwlink?LinkID=118080
Here comes the main part. It is not enough to just have .net redistributable on same location as your app, there is slightly more to do.
Unpack contents of installer from command line (command - "dotNetFx35.exe /x")
Choose directory to unpack via dialog shown.
Copy CONTENTS of subdirectory WCU\dotNetFramework to
a)x86 systems: %Program Files%\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\DotNetFx35SP1
b)x64 systems: %ProgramFiles(x86)%\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\DotNetFx35SP1
In the same locations there should be xml file prduct.xml, edit it as folows:
A) Paste the following into the < PackageFiles > element:
B) Find the element for < PackageFile Name="dotNetFX30\XPSEPSC-x86-en-US.exe" and change the PublicKey value to: 3082010A0282010100A2DB0A8DCFC2C1499BCDAA3A34AD23596BDB6CBE2122B794C8EAAEBFC6D526C232118BBCDA5D2CFB36561E152BAE8F0DDD14A36E284C7F163F41AC8D40B146880DD98194AD9706D05744765CEAF1FC0EE27F74A333CB74E5EFE361A17E03B745FFD53E12D5B0CA5E0DD07BF2B7130DFC606A2885758CB7ADBC85E817B490BEF516B6625DED11DF3AEE215B8BAF8073C345E3958977609BE7AD77C1378D33142F13DB62C9AE1AA94F9867ADD420393071E08D6746E2C61CF40D5074412FE805246A216B49B092C4B239C742A56D5C184AAB8FD78E833E780A47D8A4B28423C3E2F27B66B14A74BD26414B9C6114604E30C882F3D00B707CEE554D77D2085576810203010001
C) Find the element for < PackageFile Name="dotNetFX30\XPSEPSC-amd64-en-US.exe" and change the PublicKey value to the same as in step above
Save the product.xml file
Thats it. Before that, when you attemp to publish it from visual studio it throws errors that it is unable to find variaus parts of .net 3.5 framework. Now it should work fine.
More information at:
http://download.microsoft.com/download/A/2/8/A2807F78-C861-4B66-9B31-9205C3F22252/VS2008SP1Readme.htm#General%20Issues
Section 2.3.1.1. - Enable Samesite for the .NET Framework 3.5 SP1 bootstrapper package
We are developing C# Winforms applications.Now i want to deploy my application using clickonce.Here i successfully added the dll reference and prerequisites(.net 4).But we are using DSO Framer control for displaying word document through our c# application.For, that we have installed an dsoframer control using dsoframer control setup exe file.
i want to include this Custom prerequisites with .net 4.
I also want to inlcude my data files...
Please guide me to get out of this issue...
According to the ClickOnce Security and Deployment
You must have the redistributable package (.exe or .msi file) and describe the package with a language-neutral product manifest and a language-specific package manifest.
In order to do so you will need to Create a Bootstrapper Package. Once you have completed that and copied the files to the correct location "the bootstrapper package automatically appears in the Visual Studio prerequisites dialog box."
I have created a piece of software to download data from finger-scanners and write them to a database. The drivers of them should be installed first, so the driver setups should be installed while he installs the software. I don't know how to do it. It is written in C#.
You may create a setup for your app using Visual Studio Setup Projects. It helps you to run external exe s or msi s when your setup runs.
Go to File -> New -> Project -> Other Project types -> Setup and Deployment to create a setup project as you prefer. Then you may use Custom actions to add the feature you requrire. (The 3rd and 4th links below shows about custom actions).
Refer to:
http://www.codeproject.com/KB/dotnet/Win_App_Setup_Project.aspx
http://www.codeproject.com/KB/install/ExtendVSSetupProject.aspx
http://devdump.wordpress.com/2009/01/17/setup-project-custom-actions/
http://www.simple-talk.com/dotnet/visual-studio/visual-studio-setup---projects-and-custom-actions/
Also you may create a script based installer for your app, which will let you create an installer with with high customizability and features.
Refer to
Main Page - NSIS
Embedding other installers - NSIS
Hope this helps...
You can't run an MSI based install from a Visual Studio custom action. MSI doesn't permit that kind of recursive install (because it's a transaction, and because it tries to use system restore points per install etc). That's part of the reason why other prerequisites are installed by the setup.exe program. The bootstrap manifest generator can be used to generate custom prerequisites (first topic in this forum).
From:
https://social.msdn.microsoft.com/Forums/windows/en-US/dfb5de84-a0f0-4639-958e-8cbf4cba6e90/setup-deployment-project-cannot-launch-another-installation?forum=winformssetup
If the end user dont have .net 4.0 installed , i dont want them to go to a microsoft page to download manually and install it. I rather want them to just click "ok" and the setup goes to my website and downloads the webinstaller file and start installing automatically.
In my solution i have 2 project, 1 windows project and 1 setup project. I have noticed that if i go to properties on either of the projects and then Prerequisites, there i can choose between these 3 options :
Download prerequisites from the component vendor's website ( default )
Download prerequisites from the same location as my application
Download prerequisites from the following location ( with a textbox )
I should want the last option right? But do i link to a folder in my website and it will look there for the right "name" to install ? Then i have to add the installers to that folder?
And i dont know if i only should do this on the windows project or the setup project or both?
I am using visual studios default installer.
Really confused.
Thanky you.
If it is ok for you to distribute the .NET framework with the program you can use the instructions from the answer to this post:
silent .NET Framework install in setup project
The setup should install the .NET framework without requiring any user input.
I normally choose the second options.
Why? Because VS actually compiles a bootstrapper which gets sent to you Debug/Release folder. So all you need to do is copy that whole folder and burn to cd or usb and ship to your client.