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!
Comments
All the above and more will be painlessly taken care of by the AppUp™ SDK Plugin Package Utility
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.
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?
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.
Here is a video that does the same tutorial as Brian wrote.
http://appdeveloper.intel.com/en-us/video/video-creating-msi-installer-u...
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.
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.
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
Hi,
Why is it necessary to include both the release and debug merge modules in the installer?
John,
For details on making sure that your MSI installs silently, please have a look at this post:
Silent Installer Demystified
How do I make my install silent in VB studio 2008?
-Thanks
-John T.
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).
Aj,
You may be in Release or Debug mode when you execute step 1, it will not affect the Package and Deployment project creation.
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
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