Command Line Installation
This page explains the steps required to install NCache on Windows, along with any necessary prerequisites. It also describes the available installer parameters and how they can be used to accommodate different application and deployment environments.
Important
Before installing NCache using command line installation, make sure that .NET 10 is installed on the target machine.
Install NCache Using Command Line Installation
Note
For NCache Open Source, the installation type is only Cache Server.
Search for Command Prompt on the Windows Start menu. Right-click on the search result Command Prompt, and select Run as Administrator, before proceeding with the following:
Install Cache Server
Run msiexec.exe utility from Command Prompt to install NCache Server as follows. Notice INSTALLMODE=0 indicates “Cache Server” installation (please refer to the NCache Installation Options to learn more about Cache Server). /qn indicates Silent Mode.
Warning
Please note that options such as STARTCACHE, ENABLEFIREWALLPORTS, and BINDTOIP are not available in the NCache Open Source edition.
msiexec.exe /I "C:\NCacheSetupPath\ncache.ent.net.x64.msi" INSTALLMODE=0 KEY=XXXXXXXXXXXXXXXXX USERNAME="John_Smith" PASSWORD="pass123" INSTALLDIR="C:\Program Files\NCache" BINDTOIP="20.200.20.11" ENABLEFIREWALLPORTS=1 STARTCACHE="True" /qn
Install Developer/QA
Run msiexec.exe utility from Command Prompt to install NCache Server as follows. Notice INSTALLMODE=2 indicates “Developer” installation (please refer to the NCache Installation Options to learn more about Dev/QA).
msiexec.exe /I "C:\NCacheSetupPath\ncache.ent.net.x64.msi" INSTALLMODE=2 USERNAME="John_Smith" PASSWORD="pass123" INSTALLDIR="C:\Program Files\NCache" STARTCACHE="True" /qn
Install Remote Client
Run msiexec.exe utility from Command Prompt to install NCache Remote Client as follows. Notice INSTALLMODE=3 indicates “Remote Client” installation (please refer to the NCache Installation Options to learn more about the Remote Client). /qn indicates Silent Mode.
msiexec.exe /I "C:\NCacheSetupPath\ncache.ent.net.x64.msi" INSTALLMODE=3 USERNAME="John_Smith" PASSWORD="pass123" INSTALLDIR="C:\Program Files\NCache" /qn
Install With Administrative Rights
Run msiexec.exe utility from Command Prompt to install NCache using an account with administrative credentials. Specify the USERNAME and PASSWORD properties to provide the credentials of a Windows account that has administrative privileges on the machine.
msiexec.exe /I "C:\NCacheSetupPath\ncache.ent.net.x64.msi" INSTALLMODE=0 KEY=XXXXXXXXXXXXXXXXX USERNAME="John_Smith" PASSWORD="pass123" INSTALLDIR="C:\Program Files\NCache" /qn
Install While Logging Potential Installation Errors
Run the msiexec.exe utility from the Command Prompt with an appropriate logging option and specify the path where the log file should be created. The following logging options can be used depending on the information you want to capture:
/le: Logs all error messages./lv: Logs verbose output./l*: Logs all standard information except verbose output (/lv) and extra debugging information (/lx).
You can combine /l* with v as /L*V to log all standard information along with verbose output. For example:
msiexec.exe /I "C:\NCacheSetupPath\ncache.ent.net.x64.msi" INSTALLMODE=0 KEY=XXXXXXXXXXXXXXXXX USERNAME="John_Smith" PASSWORD="pass123" INSTALLDIR="C:\Program Files\NCache" /L*V "D:\demo-output.log"
Note
You can use these logging options with /qn to generate installation logs during a silent installation.
Install NCache with a Bound Service IP
Run msiexec.exe from Command Prompt and specify the BINDTOIP property to bind the NCache Service to a particular network interface. By default, NCache binds to the primary IP address of the local machine. However, in environments with multiple network interfaces (multi-NIC servers), you may want NCache to listen on a specific IP address.
msiexec.exe /I "C:\NCacheSetupPath\ncache.ent.net.x64.msi" INSTALLMODE=0 KEY=XXXXXXXXXXXXXXXXX INSTALLDIR="C:\Program Files\NCache" BINDTOIP="10.10.0.15" /qn
Install NCache With Firewall Rules
Run msiexec.exe from Command Prompt and use the ENABLEFIREWALLPORTS property to control whether the installer automatically creates Windows Firewall rules for NCache ports. By default, the installer enables the required firewall ports to allow communication between cache servers and clients.
msiexec.exe /I "C:\NCacheSetupPath\ncache.ent.net.x64.msi" INSTALLMODE=0 KEY=XXXXXXXXXXXXXXXXX INSTALLDIR="C:\Program Files\NCache" ENABLEFIREWALLPORTS=1 /qn
Install NCache and Start Default Cache
Run msiexec.exe from Command Prompt and use the STARTCACHE property to control whether the default demoCache starts automatically after installation.
By default, the installer starts the demoCache at the end of installation for Cache Server mode.
msiexec.exe /I "C:\NCacheSetupPath\ncache.ent.net.x64.msi" INSTALLMODE=0 KEY=XXXXXXXXXXXXXXXXX INSTALLDIR="C:\Program Files\NCache" STARTCACHE="True" /qn
Install NCache Assemblies into the Global Assembly Cache (GAC)
Run msiexec.exe from Command Prompt and use the INSTALLDLLSTOGAC property to install all NCache assemblies into the Global Assembly Cache (GAC). This is a machine-level repository used by .NET Framework to store strongly named shared assemblies, which is located at C:\Windows\Microsoft.NET\assembly\ for centralized assembly management.
This option allows NCache assemblies to be shared machine-wide so that multiple .NET Framework 4.8 applications can use the same centrally installed assemblies instead of maintaining separate local copies.
Essentially, enable INSTALLDLLSTOGAC=True to allow NCache assemblies to be shared across applications instead of maintaining separate local DLL copies for each one. You should not enable this option if you are installing .NET 8 or other modern .NET packages, or if you prefer application-local deployment.
msiexec.exe /I "C:\NCacheSetupPath\ncache.ent.netfx.x64.msi" INSTALLMODE=0 KEY=XXXXXXXXXXXXXXXXX INSTALLDIR="C:\Program Files\NCache" INSTALLDLLSTOGAC=True /qn
Important
If you choose to provide an account other than the local account, you have to allow this user to log in to the NCache Service. See troubleshooting for more details.
You can refer to the Getting Started Guide to get you started with setting up the NCache environment.
Installer Reference
The following are the properties that you need to provide while installing NCache using command-line installation.
Note
The parameters with asterisk (*) on their names are the required parameters and the rest are optional.
| Switch/Properties | Purpose | Default Value |
|---|---|---|
/I <.msi Package Path>* |
Specifies the path of the .msi file downloaded from the Alachisoft website. | |
KEY* |
Specifies the license key provided when you download NCache. | - |
INSTALLMODE* |
Specifies the installation type. Possible values are: - 0 (Cache Server) - 2 (Developer) - 3 (Remote Client) |
|
INSTALLDIR* |
Specifies the directory where you want NCache to be installed. Most commonly, this is C:\Program Files\NCache. | |
/qn |
Installs NCache in quiet mode without user interaction. | - |
/le <Log File Path> |
Enables logging and includes all error messages in the output log file. | No log file is generated unless logging is specified. |
/lv <Log File Path> |
Enables logging and includes verbose output in the output log file. | No log file is generated unless logging is specified. |
/l* <Log File Path> |
Enables logging and records all standard information except verbose output (/lv) and extra debugging information (/lx). |
No log file is generated unless logging is specified. |
/L*V <Log File Path> |
Logs all standard installation information along with verbose output. | No log file is generated unless logging is specified. |
USERNAME |
Username of the account with administrative credentials. | Username of local system account. |
PASSWORD |
Password of the account with administrative credentials. | Password of local system account. |
BINDTOIP |
IP address to which the NCache Service binds. | IP address of local machine. |
ENABLEFIREWALLPORTS |
Defines whether firewall rules are created to allow NCache ports when the firewall is enabled. | 1 (enable) |
STARTCACHE |
Defines whether the default demoCache is started at the end of the installation. | True |
INSTALLDLLSTOGAC |
Installs NCache assemblies into the Global Assembly Cache (GAC), allowing them to be shared across the machine by multiple applications. This is only applicable to NCache .NET Framework client assemblies used by .NET Framework 4.8 applications. | False |
Note
For Cache Server installation, the STARTCACHE flag is set to true by default, which means that the cache will automatically start at the end of the installation.
Uninstall NCache Using Command Line Installation
Run msiexec.exe utility from Command Prompt to uninstall NCache as follows. It’s the same command for uninstalling Server/Developer/Remote Client.
msiexec.exe /x "C:\NCacheSetupPath\ncache.ent.net.x64.msi" /qn
Note
If you encounter any issues during installation, please refer to the troubleshooting section.
Troubleshooting
See Also
Windows Installation
Network Installation with PowerShell
Evaluation Period Management