I have a ASP.NET web application. Now I want to create a installer using InstallAware so that my customers just click on the installer and it will be put on the web server as well as configure IIS for the web application Is there any one who can instruct me how to do it? This is the first time I am using InstallAware
Thanks i开发者_如何转开发n advance, Mohin
If you have access to InstallAware's MSICode
, you can use the following code:
In the Define Setup Globals
Section:
Get Folder Location WWW->WWWRoot into WWWROOTDIR
In the Perform First Time Install
section, just before calling Apply Install
:
Install Files D:\Projects\mywebsite\Release\*.* to $WWWROOTDIR$\mywebsite, include subfolders
In your Perform First Time Install
section, after Apply Install
is done:
if Variable SUCCESS not Equals ERROR
if Variable SUCCESS not Equals CANCEL
Get IIS Index for Site "Default Web Site" into DEFAULTWEBSITEINDEXVAR
Create Virtual Folder "mywebsite" in IIS Site #$DEFAULTWEBSITEINDEXVAR$, pointing to physical location $WWWROOTDIR$\mywebsite
Get System Setting IIS Anonymous User Account into INETUSR
Set Read Permissions on File System Object "$WWWROOTDIR$\mywebsite" for Current User Authenticated Users $INETUSR$
end
end
If you do not have access to MSICode
, this is still easy to do using the InstallAware Designer.
- Go to Server Configuration > IIS Sites
- Create a Virtual Directory under "Default Web Site"
- Make sure you choose the correct ASP.NET version, and that Default.aspx is on top of the Documents tab file listing.
- Enable appropriate Directory Security settings
- The rest of the settings can stay default
- Go to Setup Architecture > Files
- In the directory list below, if
$WWWROOTDIR
does not exist, create it by Right-clicking on "Target Folders" and choosing "Add System Folder", "WWW->WWWRootDir
" - Create a sub-folder under that with the name of your virtual directory
- Add all files you need for your ASP.NET application here - you can use wildcards too
- In the directory list below, if
This should be enough to have InstallAware setup the IIS website and your application.
If you have common Assemblies, you can directly install them into the GAC by adding them in the Setup Architecture > Assemblies page. The additional advantage is that you can choose to have ngen
run on them.
精彩评论