Monday, July 20, 2009

MSI deployment

The following procedure i ll deal with the deployment of msi(microsoft installer)......
i would like to explain this procedure with the help of figures so that every one who view this procedure would understand very easily....

Basically an msi is a microsoft installer...with the help of this any website which a user will create in his pc would install completely in someother target machine...just similar to software(which installs many files in program files)

My intention in this blog is to create an msi which will install my two applications in the target machine...(I am using visual studio 2005)
------------------------------------------------------------------------------------


This figure is the first step in deploying an msi for the project...in this there are two options
1..windows application
2..web application
suitable application you need to create for urself...window application is similar to a normal software which can be configurable and can be installed anywhere in the system...where as web application needs an IIS to be installed in the target machine...select the application suitable to your need.....



once you select the type of setup you need it will have the window shown in the figure..here there are three important sections
1..folders to be visible on the target computer
2..contents inside the folders of the selected one in the 1st section
3..solution explorer which has every necessary thing to be used in the project.....



Here you need to add in the websites which you need to be installed in the target machine...there is no limit to the number of websites you add to the project...(i have added two websites in my project which can be viewed in the next figure) which can be done just by rightclicking the solution explorer->add->existing website....


This is just to show that more than one websites can be added to the project....


This section mainly focusses on the folders to be installed in the target machine once the application launches...my intent here is to have two applications to be launched after installation..hence i hav created the necessary folders in the filesystem view of the application....It is just by right clicking on the target machine and selecting the webfolder..which will create one webfolder in the filesystem section.....


Not just the normal webfolders you can create some special folders like users desktop, program files etc., so that the files present in these sections would be same as the files which are going to be installed in the target machines desktop and program files section.,(this can be achieved by right clicking on the "file system on target machine" adding some special folders which you can view it in the figure.....


coming to adding the contents in your application...(here i have created two folders seperately in the target machine to install my two websites in those two folders) now one just need to add the contents to the folder they needed...just select the folder and rightclick ->add->project output and this will pop up one window in which you will hav all the website contents you added in the third step (third figure) and select one particular website and add the contents to that folder....similar way add the contents to all the folders in your application...one can even create a shortcut so that it can be used directly to view the contents of the folder or any particular application which can be explained in the further figure....


i hav created a shortcut on the users desktop and mentioned its path to the selected folder....select the users desktop right click on it select "create a short cut on the desktop" and change the necessary properties of the shortcut like
defaulty the target would be the desktop itself...change it accordingly...
you can even change the icon of the shortcut but for that you need to add that icon to the project...once the application installs in the target machine it will generate a shortcut on the desktop....
one can change the appearence of the installation process with the customized pictures and customised messages which can be configurable in the view section of the project...can be shown in the figure below



different views are there for the application...and i wont deal with it detailly you can check that information from the necessary sources.....



the final step is to build the msi file..it is just a simple process just right click on the project and select build website....it will generate two files
.msi and .exe
both can be used to launch the application....
i hope every one understood the process of deploying a website....or else just send a mail to me i would modify this content based on your comments.....

thanx
regards
kiran.joshi