Command Line Installation
NCache provides a command line installation that you can either run from Command Prompt or add to your script files (.bat files). To install NCache from Command Prompt, use the msiexec.exe utility.
Note for Silent Mode Installation
NCache installation requires an installation of Microsoft Visual C++ 2010 x64 Redistributable as a pre-requisite. However, there are some cases where command line and PowerShell installation in quiet mode results in the redistributable not being downloaded.
Hence, as a precaution, it is highly recommended that the following PowerShell script is executed BEFORE INSTALLATION in quiet mode to download and install the redistributable package according to the operating system detected:
# VCRedist check and download
if([Environment]::Is64BitOperatingSystem)
{
Write-Host "64-Bit OS Detected"
$regEntry = Test-Path Registry::HKLM\SOFTWARE\\Classes\\Installer\\Products\\1926E8D15D0BCE53481466615F760A7F
$url =
"https://download.microsoft.com/download/3/2/2/3224B87F-CFA0-4E70-BDA3-3DE650EFEBA5/vcredist_x64.exe"
vcRed = "vcredist_x64.exe"
# Checking if vcredist_x64 is installed on this machine
if($regEntry -eq 0)
{
# If no installation found download visual c++ redistributable
write-host "Microsoft Visual C++ 2010 x64 Redistributable NOT Found"
write-host "Downloading from $url"
$vcredistPath = "$ENV:temp\$vcRed"
(New-Object System.Net.WebClient).DownloadFile($url, $vcredistPath)
write-host "Download Complete"
# Installing vcredist_x64
write-host "Installing Microsoft Visual C++ 2010 x64 Redistributable"
start-process -Wait $vcredistPath -ArgumentList "/norestart /q"
write-host "Installation Complete"
}
else
{
write-host "Microsoft Visual C++ 2010 x64 Redistributable is already installed on this computer."
}
}
$regEntry = Test-Path
Registry::HKLM\\SOFTWARE\\Classes\\Installer\\Products\\1D5E3C0FEDA1E123187686FED06E995A
$url =
"https://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe"
$vcRed = "vcredist_x32.exe"
# Checking if vcredist_x32 is installed on this machine
if($regEntry -eq 0)
{
# If no installation found download visual c++ redistributable
write-host "Microsoft Visual C++ 2010 x32 Redistributable NOT Found"
write-host "Downloading from $url"
$vcredistPath = "$ENV:temp\$vcRed"
(New-Object System.Net.WebClient).DownloadFile($url, $vcredistPath)
write-host "Download Complete"
# Installing vcredist_x32
write-host "Installing Microsoft Visual C++ 2010 x32 Redistributable"
start-process -Wait $vcredistPath -ArgumentList "/norestart /q"
write-host "Installation Complete"
}
else
{
write-host "Microsoft Visual C++ 2010 x32 Redistributable is already installed
on this computer."
}
You can now proceed to install NCache in silent mode.
Installing NCache
- Open Command Prompt with administrative privileges and enter the following command:
msiexec /I <Installation Package Path> EDITION=”0|2|3” KEY="INSTALL_KEY_EMAILED_TO_YOU" USERFIRSTNAME="John" USERLASTNAME="Smith" COMPANYNAME="Alachisoft" EMAILADDRESS="john@alachisoft.com" INSTALLDIR="<Target Dir>"”" /qn
Switch/Properties | Purpose | Default Value |
---|---|---|
/I <.msi Package Path> (Required) |
Path where you have downloaded ncache.enterprise.x64.msi file from the Alachisoft website. | Empty |
EDITION |
Specifies the installation type. Possible values are:0 (Cache Server)2 (Developer)3 (Remote Client)See below for details on each installation type. |
0 (Cache Server) |
KEY (Required) |
Installation Key: You will have received this via email from Alachisoft when you downloaded NCache. If not, then visit http://www.alachisoft.com/download-ncache.html to register and obtain one. | Empty |
USERFIRSTNAME |
Your first name | - |
USERLASTNAME |
Your last name | - |
COMPANYNAME |
Your company name | - |
EMAILADDRESS (Required) |
Your email address | - |
INSTALLDIR |
Directory where you want NCache to be installed. Most commonly, this should be C:\Program Files\NCache. | Local Directory\Current Directory |
/qn |
Quiet mode: Install NCache without any user intervention. | Empty |
Press Enter.
The installation process starts. Once the installation process is complete, NCache will be successfully installed in the specified directory.
Installation Editions
Client Server installs the full server product along with the local client.
Remote Client installs the local and client caches, ASP.NET session modules and NCache API for remote cache access.
Developer installs standalone local cache and development libraries, along with restricted access to remote caches. Note the following limitations for** Developer Installation Type** while connecting to remote caches:
Throttling of 50 requests/sec for each client: All such clients that are licensed under DEV license will not be able to make more than 50 requests/sec to the remote cache.
Limited number of requests (200,000) a client can send to remote cache: In a lifetime of client application in case it is licensed under DEV license, the client will stop making requests to remote cache after it has sent 200,000 requests to remote cache. The only work around is to restart application for another 200,000 requests. Once the client has made 200,000 requests, a licensing exception will be thrown saying “Clients running under DEV license cannot send more than 200,000 requests to remote cache.”
Note
Developer licensed clients can make requests to local caches without any limitation.
Examples
- Installing a Cache Server
msiexec.exe /I "C:\NCacheSetup\ncache.ent.x64.msi" EDITION=0 KEY=INSTALL_KEY_EMAILED_TO_YOU USERFIRSTNAME="John" USERLASTNAME="Smith" COMPANYNAME="Alachisoft" EMAILADDRESS="john\@alachisoft.com"
INSTALLDIR="C:\Program Files\NCache" SETPERMISSION="1" /qn
- Installing NCache on a Developer Workstation
msiexec.exe /I "C:\NCacheSetup\ncache.ent.x64.msi" EDITION=2 KEY=INSTALL_KEY_EMAILED_TO_YOU USERFIRSTNAME="John" USERLASTNAME="Smith" COMPANYNAME="Alachisoft" EMAILADDRESS="john\@alachisoft.com"
INSTALLDIR="C:\Program Files\NCache" SETPERMISSION="1" /qn
- Installing a Remote Client
msiexec.exe /I "C:\NCacheSetup\ncache.ent.x64.msi" EDITION=3 KEY=INSTALL_KEY_EMAILED_TO_YOU USERFIRSTNAME="John" USERLASTNAME="Smith" COMPANYNAME="Alachisoft" EMAILADDRESS="john\@alachisoft.com"
INSTALLDIR="C:\Program Files\NCache" SETPERMISSION="1" /qn
Uninstall NCache
To uninstall NCache through command line, use the following syntax:
msiexec.exe /x <Installation Package Path> /qn
An example is given below.
msiexec.exe /x "C:\NCacheSetup\ncache.ent.x64.msi" /qn