Converting .exe file into .msi format

Converting .exe file into .msi format

Khan's picture
Hi ATOM Tech, I am have developed an open source app using Visual Studio 2008 and the program is runing fine its in .exe so in order to submit an app for store it accept only .msi format for windows apps so pls help me in creating creating in msi format.I checked that Advanced installer, but facing few problems. can you ask you technical team to fix this issue Error that I get while converting .exe to .msi: [ DefaultBuild ] Building package (en): C:\Users\Sai Satish\Documents\Advanced Installer\Projects\Online TV\Setup Files\setup.exe Reusing archives from cache... done. Creating MSI database... error. Exception - Reason: Error calling Msi API: 1627 Method: MsiViewExecute Table: MsiAssembly. Extended Error: 1: 2259 2: C:\Users\Sai Satish\Documents\Advanced Installer\Projects\Online TV\Setup Files\setup.msi 3: 4: . Build finished because an error was encountered. Is there any other way by which I can convert into .msi more easily without problem. Immediate help will be greatly appreciated Thanks in advance. Khan
Khan
25 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
BrianDevArch's picture

Khan,

What are you using to create your MSI? I wrote a blog article that should be approved today on creating MSI's using Visual Studio 2008.

BrianDevArch's picture

Khan,

This may also help you. It is from a blog post I have submitted, but it seems many could benefit from it right away:

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 & 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 5 C++ Runtime (CRT)

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 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.

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.

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

hobbes's picture

Hello Brian

I am haveing a bit of trouble on step number 4. "With the Setup and Deployment File System tab still open" I am trying to find this tab in order to find the "Create New Shortcut" option. Can you please post a picture of this or any hint of where it is?

Thanks
Peter

BrianDevArch's picture

Peter,

Look in your Solution Explorer on the right hand side of the screen. Right click on your Package and Deployment project and choose View -> File System. This will bring up the view you are after. From there continue with Step 4 below.

----------------------------

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.

hobbes's picture

Hello Brian

Thank you for you help. When I right click on the Applicatoin Folder one of the options is "Create Shortcut to Application Folder". This is the only way I can create a short cut. However I don't want to create a short cut to the application folder, instead I want to create a shortcut to the exe. Once this short cut is created there is no way to find it again or make changes to it. If I open the solution in a text editor I can see that there is a short cut there but no way to make changes to it. I think I am not on the right track here.

Thanks
Peter

Dmitry Rizshkov's picture

Right click on the solution -> "View" -> "File System". You will see a two panes. In the left pane select "Application Folder" with left click. At the right pane you will see your exe file. Right click on it -> "Create shortcut to ... exe"

After shortcut has been created you need to choose shortcut icon. Click on shortcut, press Alt+P (to bring up Properties window) and choose icon by setting up the "Icon" property.

Than drag and drop your shortcut to the destination folder (Desktop or Programms menu)

Khan's picture

Brain,

I used Advanced Installer... ?

Thanks,
Khan

Khan
BrianDevArch's picture

Khan,

I have no experience using a tool named "Advanced Installer". I would suggest if at all possible to use Visual Studio 2008. You can easily create a Package and Deployment project to create your MSI. You app is targeting the Windows platform correct? Please let me know if you need any assistance.

Khan's picture

Great Brain,

I am confident that the above method will work.. You have specified each and every step in detail thats really cool...

Let me trying doing this right way.

Thanks and Thanks a lot.
Khan

Khan
BrianDevArch's picture

Peter,

I made a quick screencast for you showing how to add both Desktop as well as Start Menu shortcuts for your application. Please have a look at let me know if this clears things up for you.

Screencast Link: Click here to view
* You will want to click on the full screen button to see this in detail

Direct Download Link: Click here to download

BrianDevArch's picture

You're welcome. Good luck.

hobbes's picture

Thank you Brian, that helped me a lot. My problem was the File System window did not show the right hand pane at all until I made it much bigger.

Peter

BrianDevArch's picture

You are quite welcome. Please let me know if you experience any other troubles.

Bosco DSouza's picture

Just a note,

The free version of the Advanced Installer can be used to build an IADP compliant .msi for 30 days only [via the Professional interface, as opposed to the Simple interface].

Khan's picture

Hi Brain,

This steps works really good and its easy, I was able to convert to .msi very smothly and I was able install without any error. I thank you for all your support and valuable information.

Thanks again for help me and others on the forum Brain.
Khan

Khan
BrianDevArch's picture

My pleasure. Did you remove all UI dialogues from your Package and Deployment project? This ensures a silent install.

onlock's picture

Brian,

So I LOVE this post. But the one thing is that i cannot find these merge modules:
Microsoft_VC90_CRT_x86.msm
Microsoft_VC90_DebugCRT_x86.msm

Do I nned to download something specific?
Thank you for your help!

Mobile 1UP's picture

has anyone tried using free msi creators like this:

http://dennisbareis.com/makemsi.htm
http://www.cornerhouse.ca/en/msicreate.html
http://sites.google.com/a/instedit.com/www/

would be interesting to know if anyone has considered this as an option as well.

BrianDevArch's picture

Mobile 1UP,

MakeMSI is alright. A few individuals here have tried NSIS, WISE, and a few others.

The real requirements on whether any of them are viable options are:

1.) Do they allow for merge modules (or some attempt to include required run-time)
2.) Do they provide for an install without prompting the user for input (path, EULA, etc.)
3.) Do they follow the same specifications that a "standard" MS MSI does; parameters for pathing and localization

Beyond that, an intuitive script / designer that is easy enough to use. This is my primary reason for sticking with Visual Studio 2008's Package and Deployment projects. They integrate well with VS Projects, cost nothing extra, and take ext to no time to configure.

Michael Kasprzak's picture

Yeah, we need to use Visual Studio 2008 right now anyways, and the built in MSI maker is just a few clicks away from a working installer.

And unless it's changed in the past couple months, NSIS can't make MSI's. On the plus side, NSIS installers work on Windows 95+ (maybe even NT 3.5)... except anything older than XP isn't really necessary to support anymore.

BrianDevArch's picture

NSIS can indeed create MSI's: http://helpdeskgeek.com/free-tools-review/create-windows-installer-msi-packages-using-nsis/

Please let me know I you find that to be false. I also prefer VS Package and Deployment projects.

Michael Kasprzak's picture

See the comments in that post. Buddy is mistaking MSI to mean installer.

I have an existing installer system using NSIS, which I would have *loved* to upgrade to some MSI capable version of the software. But all the documentation says otherwise.

lifeng-zhang (Intel)'s picture

Thanks for share!

BrianDevArch's picture

lifeng-zhang,

No problem. I have seen that many developers are passing the packaging requirements without any trouble in the past few months. Intel is really working hard to make this an easy process for us.

Login to leave a comment.