Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
215 views
in Technique[技术] by (71.8m points)

c# - How do I create an installer that can install dependency software?

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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 SDKsWindowsv7.0ABootstrapperPackages.

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...