Microsoft visual studio installer projects

Microsoft visual studio installer projects

Sajjad Arif Gul November 18, 2014 1 comment

Creating Setup & Deployment in Visual Studio


Deployment Project

1. Windows installer:

create new project>other project type> setup and deployment> visual studio installer

Types of Installers & Which one to choose from above picture?

Setup Project

Web Setup Project

Merge module project

CAB project

Customizing an installer:

Customizing an installer

Deployment editors:

File System Editor, Registry Editor, File Types Editor, User Interface Editor, Custom Actions Editor, and Launch Conditions Editor

File system editor;

User interface editor;

User Interface Editor

Registry editor;

Registry editor

Custom actions editor;

Custom Actions Editor

File Types editor;

Launch conditions editor;

File Search Properties
Registry Search & Component Search from MSDN
Launch Conditions

To make your application run in any version of .NET framework, right click on Requirement on Target Machine and then click Add .NET Framework Launch Condition, in properties window change Version to Any. There are editors available in setup project in visual studio.

Choosing prerequisites to install:

Sometimes your application may depend on components that must be available in target computer before the installation can take place. If one of those dependent components is not available, an error message will be raised and installation will be aborted!
You can make your user fill happy without a list of error messages, by including some prerequisites to be installed if not available in target computer.
To choose which one to be included in your package, right click on your deployment project and select properties, in the Property Pages dialogue box, expand the Configuration Properties node, and then select the Build property page. Click the prerequisite button and make sure that the Create setup program to install prerequisite components box is checked. Then select the prerequisites that you want to install from the Choose which prerequisites to install list.

Adding Pre Requisites to Setup Installer

Here you can select example the .NET framework version and windows installer version and other prerequisites from the dialog box.
Down the dialogue there is specify the install location for prerequisite, and three radio buttons are available:

Details of Prerequisites

This capability to automatically detect the existence of components during installation and install a predetermined set of prerequisites is referred to as bootstrapping and the component that performs it is called the generic bootstrapper which uses bootstrapper packages to install the prerequisite components on the target computer.
The default location of the bootstrapper packages is stored in the registry key HKEY_LOCAL_MACHINESoftwareMicrosoftGenericBootstrapper4.0Path. Changing this path will change the location in which the Prerequisites Dialog Box looks for bootstrapper packages.

Creating installer for 64 bit platform:

The deployment tools in Visual Studio allow you to create installers for 64-bit applications and components. The TargetPlatform Property of a deployment project determines whether an installer will target a 32-bit or a specific 64-bit platform. The target platforms are x86 for 32-bit platforms, x64 for computers supporting the AMD64 and EM64T instruction sets, and Itanium for the 64-bit Itanium processor.
In general, 32- and 64-bit Microsoft Installer (MSI) packages are treated in the same way except for how Windows Installer treats folder variables such as Program Files and System Folder, and how it writes components into the registry or GAC. To create a 64 bit installer select your setup project and in the properties window change TargetPlatform to either Itanium for an Intel Itanium 64-bit platform, or x64 for any other 64-bit platform (such as AMD64 and EM64T instruction sets).

Читайте также:  Заложило ухо при посадке самолета что делать
Creating Installer for 64 Bit Windows OS

Security in windows installer:

Windows Installer can use digital signatures to detect and correct corrupted resources. In Windows XP, Windows Installer is integrated with Software Restriction Policy to restrict both administrators and non-administrators from running program files based on the path, URL zone, hash, or publisher criteria.
Also you can sign an assembly which gives an application a unique identity that other software can use to identify and refer explicitly to it (process also called strong-name signing). A strong name consists of its simple text name, version number, culture information (if provided), plus a public/private key pair. This information is stored in a key file; this can be a Personal Information Exchange (PFX) file or a certificate from the current user’s Windows certificate store.
To sign an assembly, right click on project and click properties, from the project form click the signing tab and then select the sign the assembly. From a Choose a strong name key file drop-down list, select either if you want a new key file or
for an existing file. For new file enter a name and password in the Create strong Name key.

Security in Setup Installer – Creating Strong Name Key

Now rebuild your application and then a setup project to get a .msi file ready for installation.

2. ClickOnce technology:

To make a ClickOnce application available to users, you must publish it to a Web server, file share, or removable media. You can publish the application by using the Publish Wizard; additional properties related to publishing are available on the Publish page of the Project Designer.

Publishing using ClickOnce for Setup Creating

Publish properties can be set using the Publish Wizard but only a few of the properties are available in it, all other properties are set to their default values. Now let’s look at the properties that can be changed in this Publish page:

Publish location;

You can publish the application to a Web site, FTP server, or file path. Type the location as a disk path, file share, FTP site, or Web site URL, or click the Browse button to browse for the location.

Disk path:

Specify a local disk path from which you can copy the application to a CD-ROM or DVD-ROM. The path can be a relative or absolute path in standard Windows format, for example: C:DeployDIC.

File share:

Specify a file share by using a Universal Naming Convention (UNC) path from which the application will be deployed, for example: ServerNameDIC.

FTP server:

Specify the path of a Web site from which the application can be downloaded by using FTP, for example:

Web site:

Specify the URL of a Web site from which the application can be downloaded by using HTTP, for example:

Install mode and settings;

First you have to say if the application is available offline or not (online only). If you select The application is available online only, then it will be run directly from the publish location without creating a shortcut on thestart menu. Otherwise the application will be available even if a user is disconnected from the network and a shortcut will be available on start menu.
Also you can click on Prerequisites.. button to specify which prerequisite to be included. The prerequisite dialog is the same as the one explained above in windows installer.
Father more, if you set your application to be available offline, you can set application updates either automatically or programmatically. Also you can configure the application to check for updates automatically before the application starts, or at set intervals after the application starts. In addition you can specify a minimum required version; that is, an update is installed if the user’s version is lower than the required version.

Читайте также:  Windows 7 просмотр скрытых файлов

Publish version;

To increase publish version, increase major, minor, build or revision version number according to what updates you have made! Changing the number in these fields causes the application to be published as an update. Also you can clear the Automatically increment revision with each publish if you don’t want visual studio to automatically increment the clickOnce publish version.
Then click on Publish Now to publish your application after making sure that all settings of your application have already been set correctly.

Security in ClickOnce:

ClickOnce security relies on Authenticode certificates to determine whether an application should be installed, a step known as a trust decision. Application and deployment manifests that describe an application can be signed with a certificate to prevent tampering. Domain administrators can configure certificates to be trusted at the enterprise or machine level. If certificates are not trusted at the time of installation, ClickOnce deployment can be configured to ask users to make trust decisions. Once an application is installed, ClickOnce restricts the application permissions and actions as defined by the Internet, Local Intranet, or custom zones.

3. InstallShield 2010 Limited Edition:

Microsoft has partnered with Flexera, makers of InstallShield to create InstallShield LE for Visual Studio 2010. This is a Visual Studio extension you can download and use today to build Windows installer-based deployment packages for your application that can be deployed on the Windows platform. It provides comparable functionality to the Visual Studio Installer project but in addition, you get the easy to use, modern, graphical development environment of InstallShield, as well as the ability to build your deployment projects using Team Foundation Server.
First time users need to enable InstallShield LE by downloading and installing it. Go to create new project and select InstallShield. After creating the project the template will bring you to registration page and then the download link. Once you have installed the product, the new project dialog will provide an option to create an installShield LE project. Now after creating a new project, the first form is where we start now:

InstallShield 2010 Limited Edition

At the bottom of the screen are the steps to the installation project and I am going to talk a little on them. (Using the next button will make sure you have passed on all steps)

Application information;

Here you will feel the basic information about the application including application name and version.

Installation requirements;

Specify the prerequisites that must be installed including version of OS and .NET framework. Customer prerequisites can be defined under create a custom software condition

Installation architecture;

This step is disabled in the Limited Edition. In the other editions different features can be defined for users to choose what sections they want installed.

Читайте также:  Как копировать фото и видео из инстаграмма

Application files;

The application files such as project output can be added here (don’t forget to add primary output).

Visual Studio Output Selector

Application shortcuts;

Here you can define shortcuts for Start menu and desktop. Click on New, on the dialog select programFilesFolder>your company name>product name and you will find the primary output of your application, then tick on where you need the shortcut to be available and an icon if any.

Application registry;

If the application requires any registry entries, they can be defined here.

Installation interview;

This defines the user interface by specifying which dialogs should be displayed to users and which should not. Also you can create a custom dialog but this feature is not available in limited edition.
Also in solution explorer, there are many other features and explanation about advanced issues in deployment. You can view them for more information and customization.

Solution Explorer

Now you can build it to get a .msi file for installation which can be found from SetupNameSetupNamaExpressDVD-5DiskImagesDISK1.
NOTE: If you made any changes to your application, first rebuild your application before building the installer.
I finally installed my application in my computer.

Install Shield Wizard

This is the end of this tutorial about setup and deployment in VS2010. Good to say is that many concepts from this tutorial I studied them from Microsoft Developer Network Library.

I would like to create installers for some of my software packages, so I am attempting to use the Visual Studio Add-On known as Microsoft Visual Studio 2015 Installer Projects Extension. However, I am not having much luck. Upon running the installer I get the following message:

Microsoft Visual Studio is required, but it is not installed on this computer. Please install it and retry.

I do not understand why I would get this message, when I indeed have Microsoft Visual Studio 2015 Express for Windows Desktop installed on my computer. Here is the window when the issue happens:

Инсталлятор – программа, которая предназначена для автоматизации процесса установки других программ.

До версии 2010 включительно Visual Studio имела штатное средство для создания инсталляторов – Visual Studio Installer. Начиная с версии 2012, он отсутствует, и вместо него предлагается скачать и установить InstallShield Limited Edition.

Однако в версии 2013 Visual Studio Installer вновь стал доступен. Только он не входят в поставку и его необходимо устанавливать дополнительно.

Visual Studio Installer выпускается в виде дополнения под названием«Microsoft Visual Studio 2013 Installer Projects»

Прежде чем его установить, необходимо скачать дистрибутив.

Сделать это можно двумя способами:

  • Скачать с сайта visualstudiogalery;
  • Загрузить напрямую из оболочки Visual Studio.
    Для этого выберите пункт «Расширения и обновления» в меню «Сервис» и в открывшемся окне выберите «В сети» — «Галерея Visual Studio» — «Установка и развертывание».
    В появившемся списке нужно найти пункт «Microsoft Visual Studio 2013 Installer Projects», выделить его и нажать кнопку загрузить.

Когда загрузка файла завершится, просто закройте Visual Studio и запустите скачанный файл. После принятия лицензионного соглашения будет выполнена установка.

Запустив Visual Studio, можно будет снова использовать привычные шаблоны проектов.

Важно отметить, что Visual Studio Installer не конфликтует с InstallShield Limited Edition и их можно устанавливать одновременно на один и тот же компьютер и одну и ту же версию Visual Studio.

Из недостатков Visual Studio Installer для версии 2013 можно отметить только то, что он пока доступен только на английском языке.

Ссылка на основную публикацию
Ippon smart power pro 500
Сегодня мы в очередной раз тестируем ИБП торговой марки IPPON, которые производятся на мощностях тайваньской фирмы Centralion Industrial INC. В...
Dell vostro 15 3000 series драйвера
Выберите модель ноутбука Dell или введите модель устройства Dell Vostro 15 3565 Драйвера, утилиты и инструкции: ВЕРСИИ САЙТА ПОЛИТИКА КОНФИДЕНЦИАЛЬНОСТИ...
Delphi уроки для начинающих
Почему именно Delphi? В Delphi сделать первый шаг очень просто, она интуитивно понятна. Конечно, небольшому числу разработчиков по долгу службы...
Iratus lord of the dead прохождение
«Darkest Dungeon наоборот» — тактическая РПГ Iratus: Lord of the Dead выходит в ранний доступ сегодня. В августе появится озвучка...
Adblock detector