NsisIIS plug-in: Difference between revisions
Line 135: | Line 135: | ||
Example: NsisIIS::GetAppPool "MyAppPool" | Example: NsisIIS::GetAppPool "MyAppPool" | ||
$1 Returns: ? | |||
$2 Returns: .Net Framework Version | $1 Returns: ? | ||
$3 Returns: Managed Pipeline Mode | $2 Returns: .Net Framework Version | ||
$3 Returns: Managed Pipeline Mode | |||
== TODO == | == TODO == |
Revision as of 19:21, 26 October 2011
Author: Kamyar (talk, contrib) |
Links
NsisIIS.zip (16 KB)
Nsis IIS plugin page on SourceForge
Description
Version: 1.0.0
NsisIIS plugin to create/edit/delete/getinfo Microsoft IIS virtual directories and manage it's service status
Instructions:
- Copy NsisIIS.dll to Plugins folder of Nsis
- Read this readme and example files.
Functions
NsisIIS::CreateVDir
Creates an IIS virtual directory and sets its configuration, or just set the configuration if it already exists.
After calling, you MUST Pop the message, it can be the success or fail message. You can also put the settings to Nsis user variables $1 through $5. See the documentation for details.
Example: NsisIIS::CreateVDir "VDir Name" "Physical Path"
NsisIIS::DeleteVDir
Deletes an IIS virtual directory by its name. After calling, you MUST Pop the message, it can be the success or fail message.
Example: NsisIIS::DeleteVDir "VDir Name"
NsisIIS::GetVDir
Gets an IIS virtual directory configuration (if exists) and put it into user variables $1 through $5. See the documentation for details. After calling, you MUST Pop the message, it can be the success or fail message.
Example: NsisIIS::GetVdir "VDir Name"
NsisIIS::ListVDirs
Gets a list of IIS Virtual Directory names, as a comma separated string.
Example: NsisIIS::ListVDirs
NsisIIS::Start
Tries to start IIS service if stopped. After calling, you MUST Pop the message, it can be the success or fail message.
Example: NsisIIS::Start
NsisIIS::Stop
Tries to stop IIS service if started. After calling, you MUST Pop the message, it can be the success or fail message.
Example: NsisIIS::Stop
NsisIIS::Pause
Tries to pause IIS service if running. After calling, you MUST Pop the message, it can be the success or fail message.
Example: NsisIIS::Pause
NsisIIS::Resume
Tries to resume IIS service after calling Pause. After calling, you MUST Pop the message, it can be the success or fail message.
Example: NsisIIS::Resume
NsisIIS::GetIIsInfo
Gets IIS Information. Currently only the version as "major.minor" string in $0.
Example: NsisIIS::GetIIsInfo
NsisIIS::ListWebSites
Tries to get a list of IIS Web Site names, as comma separated "Id:Title" items into $1. Note that in ADSI (and metabase) websites are identified by their index (id), not the name (title or comment).
Example: NsisIIS::ListWebSites
NsisIIS::CreateWebSite
Creates a website getting its Name (Title), Physical Path, and Bindings respectively. Other optional parameters can be feed into $1 through $4. Bindings are in the format of ADSI standard: hostname:ip:port. The following line creates a website at ort 8000, all headers and all assigned IPs.
Example:
StrCpy $1 "Classic .NET AppPool" StrCpy $2 "rs" StrCpy $3 "MyWebPage.htm" NsisIIS::CreateWebSite "MyWebSite" "D:\WebSite2" "::8000" pop $0
NsisIIS::DeleteWebSite
Deletes a website by getting its 1 based index (id).
Example:
NsisIIS::DeleteWebSite "2" pop $0
NsisIIS::GetWebSite
Gets a website information by getting its index (id). Result can be accessed via $0 through $5.
Example: NsisIIS::GetWebSite "2"
NsisIIS::ListAppPools
Lists all available IIS Application Pools as comma separated list of their names in $1.
Example: NsisIIS::ListAppPools
NsisIIS::CreateAppPool
Creates an Application Pool getting its name, and optionally other information through $1 to $3.
Example: NsisIIS::CreaetAppPool "MyAppPool"
NsisIIS::DeleteAppPool
Deletes an Application Pool getting its ID.
Example: NsisIIS::DeleteAppPool "MyAppPool"
NsisIIS::GetAppPool
Tries to get an Application Pool information getting its name, and returning the result in variables $1 through $3.
Example: NsisIIS::GetAppPool "MyAppPool"
$1 Returns: ? $2 Returns: .Net Framework Version $3 Returns: Managed Pipeline Mode
TODO
- Adding support for Virtual Directories inside a Web Site.
- Adding support for managing another machine (not local) IIS.
- Adding support for SSL & authentication settings.
History
- 2/24/2010 Released version 1.0.0 & used in my installer.
- 7/21/2011 Released version 2.0.0 & used in my installer.