HOW TO: Creating your MSI installer using Visual Studio 2008

So you want to create an MSI installer...

As we know from reading the Application Packaging Requirements Guide (http://appdeveloper.intel.com/en-us/article/packaging-requirements), we must provide our entry in a MSI format for Windows entries. I have received numerous requests for assistance in doing this. Here is a simple step by step to create your MSI installer.

Step 1 Create a Setup and Deployment Project

Let's create our new project. Right click on your solution in the Solution Explorer on the right hand side of your Visual Studio IDE and select Add -> New Project. From the list of project types, choose Other Project Types -> Setup and Deployment -> Setup Project.

Step 2 Setup Properties

We would like everyone to know who created this installer. Click on your new Setup and Deployment project in the solutions explorer. Now you will see in the Properties windows (Just below the Solutions Explorer usually), settings for Manufacturer, Author, and Title. Fill these in as appropriate.

Step 3 Add Project Output & Content

We want to include our project .exe and all required content files. Right click on your Setup and Deployment project in the Solution Explorer and choose View -> File System. Right click on the Application Folder node and choose Add -> Project Output. Choose Primary Output, this will include your .exe. Repeat this step and choose Content Files if your project has required content such as images, audio, etc.

* Special Note: In your Application project, ensure all required files are marked as Content. This can be done by selecting the file in the Solution Explorer and setting the Content property to True.

We need to include our icon to use in our shortcut later. Right click on the Application Folder node and choose Add -> File. Browse to your icon file and click OK.

Step 4 Create Shortcuts

Another requirement is to include a shortcut to our application. Fortunately this is quite simple. With the Setup and Deployment File System tab still open, right click in the right hand pane to bring up a context menu. Choose Create New Shortcut. From this dialogue, navigate into the Application Folder, and choose Primary Output from "Project name" (Active). This will point the shortcut to your .exe. Click OK to accept this selection.

Let's give that shortcut an icon as well. Click on the shortcut you just created in the right hand pane. From the Properties window you may select an icon. Click Browse, and navigate to the Application Folder, and select the icon you added to the File System back in Step 3.

If you wish to have a shortcut in the users Start Menu, repeat the steps above, substituting the User's Programs Menu node instead of User's Desktop node.

Step 5a C++ Runtime (CRT) for apps using C++ SDK

This step is critical for validation. The ATOM SDK requires the C++ Runtime to execute. Fortunately our Setup and Deployment project makes this an easy addition. Right click on your Setup and Deployment project in the Solution Explorer and choose Add -> Merge Module. You want to add two merge modules, one for CRT Release, and one for CRT Debug. These are labeled:

Microsoft_VC90_CRT_x86.msm
Microsoft_VC90_DebugCRT_x86.msm

* Special Note: If your application requires additional merge modules or runtime that is not automatically detected, this would be the time to add them.

Step 5b Additional Include files for apps using .NET SDK

If you are using .NET SDK, you don't need the CRT files as shown above in step 5a. However, you need to make sure you app is compiled for .NET framework 3.5.

Your additional include files MAY look like the image below.

Step 6 Build

The easiest part of this exercise. Right click on your Setup and Deployment project and choose Build. If all went well, you will have a nicely packaged MSI in your output folder ready to upload to the App Store.

IMPORTANT DETAILS ON SILENT INSTALL REQUIREMENT

One critical requirement in the validation process is that your MSI installed silently. You can test this by opening a command prompt, and executing your MSI using the /qn switch.

You need remove the following dialogs from your project.

Example: c:\MyApp.msi /qn

If it installs without displaying any user interface, you have succeeded in this part of the validation.

* Note: The use of the /qn switch has not been confirmed by Intel yet.

You will need to delete some dialogs in your project.

If you have any problems please do not hesitate to ask. Best of luck!

5
Average: 5 (6 votes)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Posted On : September 6, 2011 - 02:29
vladimir-kostarev's picture
Offline
Last seen: 2 weeks 5 days ago
 Brown Belt
Joined: Apr 19 2011
Points: 1690

All the above and more will be painlessly taken care of by the AppUp™ SDK Plugin Package Utility

Posted On : February 9, 2011 - 19:55
meta_logic's picture
Offline
Last seen: 26 weeks 5 days ago
Joined: Jun 14 2010
Points: 392

Remember to watch out for your Target Framework when you initially add the Installer Project. If you tend to do a lot of .NET 4.0 development, chances are you'll have it set to default at .NET 4.0. Make sure it's set to .NET 3.5 or you can change the prerequisites manually by clicking on the installer package in your solution explorer and selecting properties then prerequisites. Also, if you accidentally set it up as .NET 4.0, you'll have to expand the Detected Dependencies tree in your installer solution and find the dependency, Microsoft .NET Framework. Double click on it to open the Launch Conditions, then right click on the .NET Framework icon and ensure the Version in the properties window is set to the correct framework.

Posted On : December 22, 2010 - 13:11
Offline
Last seen: 12 weeks 2 days ago
 Brown Belt
Joined: Sep 24 2010
Points: 5095

Brian, thank you very much for the comprehensive reading!

I've read this and the additional paper ( http://devcity.net/articles/339/1/article.aspx ) , but it's still not clear for me: if I will write a class library for the installer on C#, will it require some additional .NET stuff on a destination machine?

Posted On : November 18, 2010 - 05:23
Offline
Last seen: 43 weeks 1 day ago
Joined: Nov 1 2010
Points: 12605

Hello ... I am new in Intel developement. I want to develop an application which will help to run my .swf file. So that i am develop my application in C#.net 2008. Now i want to debug the same. So i have downloaded .SDK from Intel site. Installed on my development machine, this is windows xp machine. when i tried to run my machine as per steps given. I am getting error while authorizing appliaction. It tells me that The application was not authorized for use on this machine. So i have created setup for the same application as per the given steps and tried to run application on Intel machine using setup. On intel machine when I run Intel AppUp (YM) software Debugger 1.0 it shows me error "The Ordinal 12617 could not be located in the dynamic link library mfc90u.dll".
Please help me on the same.

Posted On : October 20, 2010 - 12:54
norman-chou's picture
Offline
Last seen: 14 hours 33 min ago
 Red Belt
Joined: Jul 16 2010
Points: 465493

Here is a video that does the same tutorial as Brian wrote.

http://appdeveloper.intel.com/en-us/video/video-creating-msi-installer-u...

Posted On : September 7, 2010 - 19:05
BrianDevArch's picture
Offline
Last seen: 16 weeks 1 day ago
 Black Belt (Community Leadership) Red Belt
Joined: Nov 13 2009
Points: 62279

GianlucaM,

The solution to your dilemma revolves around the Package and Deployment projects Custom Actions feature.

These custom actions can target the Uninstall action. To get started, simple right click on your project in the Solution Explorer, and select View->Custom Actions.

This link will provide a good base to work from:

http://devcity.net/articles/339/1/article.aspx

Please let me know if I can be of further assistance.

Posted On : September 7, 2010 - 15:49
GianlucaM (not verified)

I have successfully packaged an MSI installer for our app which installs and runs properly with the ATOM SDK.

The problem is that when our app gets uninstalled, it needs to remove additional files that were created at runtime (database files and other temporary/cache files), and I can't figure out how to make the uninstall process remove files that it did not install.

Can anyone help?

Thanks,
-G.

Posted On : July 26, 2010 - 15:50
Hal
Hal's picture
Offline
Last seen: 6 weeks 5 days ago
 Red Belt
Joined: Sep 24 2009
Points: 47516

Hello,

Please see the SDK developer guide and this post: http://appdeveloper.intel.com/en-us/node/1110

Regards
Hal G.
Technical Support Team
Intel® Atom™ Developer Program
Intel AppUp(SM) Center

Posted On : July 21, 2010 - 14:05
Mike C (not verified)

Hi,

Why is it necessary to include both the release and debug merge modules in the installer?

Posted On : July 9, 2010 - 09:56
BrianDevArch's picture
Offline
Last seen: 16 weeks 1 day ago
 Black Belt (Community Leadership) Red Belt
Joined: Nov 13 2009
Points: 62279

John,

For details on making sure that your MSI installs silently, please have a look at this post:

Silent Installer Demystified

Posted On : July 9, 2010 - 09:25
John Tallon (not verified)

How do I make my install silent in VB studio 2008?

-Thanks

-John T.

Posted On : July 6, 2010 - 08:13
Robert Schmalz (not verified)

Thank you! Succinct and correct. I have actually used the VS deployment project a couple of times before but can never remember from time to time the details of performing certain actions (adding an icon to a shortcut for example).

Posted On : June 18, 2010 - 04:58
BrianDevArch's picture
Offline
Last seen: 16 weeks 1 day ago
 Black Belt (Community Leadership) Red Belt
Joined: Nov 13 2009
Points: 62279

Aj,

You may be in Release or Debug mode when you execute step 1, it will not affect the Package and Deployment project creation.

Posted On : June 18, 2010 - 02:11
Cemal Cebi's picture
Offline
Last seen: 1 year 26 weeks ago
 Brown Belt
Joined: Mar 26 2010
Points: 4395

Hello aj7777,

Can you please explain your question in detail? Other than that make sure you are using the correct software e.g Visual Studio IDE in order to follow the steps written in this article.

Best Regards

Cemal C.

Intel Customer Support
Intel® Atom™ Developer Program
Intel AppUp(SM) Beta Center

Posted On : June 17, 2010 - 13:36
aj7777 (not verified)

Please excuse my ignorance. In step 1 Create a Setup & Deployment Project, is my solution in Release mode before I get started with this?
Am trying to work thru my first deployment.
Thanks,
aj

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.