# Windows Client Pre-Requisites

All you need to do to enroll a Windows Client is to deploy a customized FileWave Client MSI to your machines. We typically recommend using an existing tool capable of deploying a MSI such as Group Policy. This customized MSI can also be "baked" into a Windows image that can be deployed via FileWave's Imaging Virtual Server (IVS) so that freshly imaged Windows machines will automatically enroll into FileWave. Lastly, the FileWave Client MSI can be manually distributed and installed on any Windows machine that has local Administrator privileges.

If your organization uses Microsoft Entra ID and your users authenticate using Microsoft Entra ID credentials into their Windows machines, please consider enrolling your Windows machines into FileWave via Microsoft Entra ID. This will also allow for Windows MDM management within FileWave. Learn more on our [Windows MDM](https://kb.filewave.com/books/microsoft-windows-mdm "Microsoft Windows MDM") article.

![custommsi.png](https://kb.filewave.com/uploads/images/gallery/2023-06/GZVCaJ7UcW82O1U8-custommsi.png)

### Generating a custom FileWave Client MSI

1. Open the [FileWave Customer Installer Builder](https://custom.filewave.com/py/custom_client_win.py) for Windows.
2. Fill out the settings accordingly.
3. Click the *"Build"* button and wait for the automatic download.
4. Extract ZIP and install the customized FileWave Client MSI.

<table id="bkmrk-%C2%A0-mandatory-settings" style="width: 86.2963%; height: 178.781px;"><tbody><tr style="background-color: rgb(251, 238, 184); height: 29.7969px;"><td style="width: 100%; height: 29.7969px;">**Mandatory Settings**</td></tr><tr style="height: 29.7969px;"><td style="width: 100%; height: 29.7969px;">**Product Version =** Your FileWave Server Version</td></tr><tr style="height: 29.7969px;"><td style="width: 100%; height: 29.7969px;">**Sync Computer Name =** Windows Hostname will be FileWave Client Name (recommended)</td></tr><tr style="height: 29.7969px;"><td style="width: 100%; height: 29.7969px;">**Server Name =** Fully Qualified Domain Name of your FileWave Server (required)</td></tr><tr style="height: 29.7969px;"><td style="width: 100%; height: 29.7969px;">**Server Port =** 20015 (do not modify)</td></tr><tr style="height: 29.7969px;"><td style="width: 100%; height: 29.7969px;">**Client Password =** Password used to modify client preferences remotely (not used in FW 16.0+)</td></tr></tbody></table>

<p class="callout info">Note: The default Server Port setting above is 20015. However, SSL is now required, and the system will automatically use port 20017 instead when 20015 is entered. Do not manually set the port to 20017. Always enter 20015, and the system will handle the SSL port change for you.</p>

<table id="bkmrk-%C2%A0-optional-settings-" style="width: 86.1728%;"><tbody><tr style="background-color: rgb(251, 238, 184);"><td style="width: 100%;">**Optional Settings**</td></tr><tr><td style="width: 100%;">**Is Tracking =** Is Location Tracking Enabled for Windows Clients</td></tr><tr><td style="width: 100%;">**Monitor Port =** Port used for FileWave Client Monitor - 20010 (do not modify but also this port is no longer used as of FileWave 16.0.0)</td></tr><tr><td style="width: 100%;">**Remotecontrol Enabled =** Screen-sharing enabled for Windows Clients</td></tr><tr><td style="width: 100%;">**Remotecontrol Prompting =** Whether or not to Prompt the end-user before starting screen-sharing session</td></tr><tr><td style="width: 100%;">**Server Certificate =** Self-Signed Certificate only; not required for CA-signed certificate</td></tr><tr><td style="width: 100%;">**Server Publish Port =** 20005 (do not modify)</td></tr><tr><td style="width: 100%;">**Tickle Interval =** Idle time for Windows Clients before checking for new Model Update (do not modify)</td></tr><tr><td style="width: 100%;">**Vnc Relay Port =** 20030 (do not modify)</td></tr><tr><td style="width: 100%;">**Vnc Server Port =** 20031 (do not modify)</td></tr></tbody></table>

<table id="bkmrk-%C2%A0-booster-settings-d" style="width: 86.2963%;"><tbody><tr style="background-color: rgb(251, 238, 184);"><td style="width: 100%;">**Booster Settings**</td></tr><tr><td style="width: 100%;">Initially you may want to make an installer that does not include Boosters. Read more about them here: [Boosters](https://kb.filewave.com/books/boosters "Boosters")</td></tr></tbody></table>

### Deploying the FileWave Client with Group Policy (Startup Script)

If you have no other way to easily deploy the FileWave Client to Windows sytems, but they are all tied to an Active Directory then leveraging Group Policy (GPO) can allow you to rapidly deploy the client with very little effort.

<div data-aura-rendered-by="33:176;a" id="bkmrk-customize-the-script">**<u>Customize the Script</u>**</div><div data-aura-rendered-by="33:176;a" id="bkmrk-save-the-script-show">- Save the script shown below and save it to **Deploy‑FileWave.ps1** on your desktop.
- You will want to make sure you edit it to point at the correct server location for the MSI installer that you created from [https://custom.filewave.com](https://custom.filewave.com) to use for the install and make sure that the computer has permission to access the file.
- Open <span class="s1">**\\&lt;your‑domain&gt;\\SYSVOL\\&lt;your‑domain&gt;\\Policies\\{YourGPO\_GUID}\\Machine\\Scripts\\Startup**</span> in File Explorer (or use the GPMC “Show Files…” button on the Startup Scripts pane) to put the script in your domain.
- The machine’s computer account (DOMAIN\\COMPUTER$) must have <span class="s1">**read**</span> permission on <span class="s2">\\\\server\\share\\FileWaveCustom.msi</span>. If it doesn’t, the copy step will fail—so be sure your share ACLs allow Domain Computers or the specific computer objects.

</div><div class="slds-col slds-grid slds-has-flexi-truncate has-tooltip full long-text forcePageBlockItem forcePageBlockItemView" data-aura-class="forcePageBlockItem forcePageBlockItemView" data-aura-rendered-by="35:176;a" data-target-selection-name="sfdc:RecordField.Knowledge__kav.Content__c" id="bkmrk-create-filewave-clie"><div class="slds-form-element slds-form-element_readonly slds-grow slds-hint-parent override--slds-form-element hover" data-aura-rendered-by="36:176;a"><div class="slds-rich-text-editor__output uiOutputRichText forceOutputRichText selfServiceOutputRichTextWithSmartLinks" data-aura-class="uiOutputRichText forceOutputRichText selfServiceOutputRichTextWithSmartLinks" data-aura-rendered-by="32:176;a" dir="ltr"><div data-aura-rendered-by="33:176;a">**<u>Create FileWave Client Group Policy</u>**</div>- Open Group Policy Management in the Active Directory.
- <div>Create a GPO and navigate to Computer Configuration &gt;&gt; Policies &gt;&gt; Windows Settings &gt;&gt; Scripts (Startup/Shutdown) &gt;&gt; Startup</div>
- Double‑click <span class="s1">**Startup**</span>, then click the <span class="s1">**PowerShell Scripts**</span> tab.
- Click <span class="s1">**Add…**</span>, then <span class="s1">**Browse…**</span> and pick <span class="s1">**Deploy‑FileWave.ps1**</span> from the Startup folder.
- Click <span class="s1">**OK**</span> to close out all dialogs and link the GPO where you need it. (Please test against 1 machine first)

<div data-aura-rendered-by="33:176;a">**<u>Enable "Turn on Script Execution" Policy (This policy can be combined into above GPO)</u>**</div>- <div>Open Group Policy Management in the Active Directory</div>
- <div>Navigate to Computer Configuration &gt;&gt; Policies &gt;&gt; Administrative Templates &gt;&gt; Windows Components/Windows PowerShell &gt;&gt; Turn on Script Execution: Set to Enabled and click OK.</div>

<div data-aura-rendered-by="33:176;a">**ADDITIONAL INFORMATION**  
The script checks if the FileWave Client (fwcld) is running, if not it will copy the installer from the share, install and generate a log file under C:\temp. If anything goes wrong (missing share access, MSI failure, etc.), you’ll see errors in <span class="s1">**C:\\temp\\Deploy‑FileWave.log**</span>, trimmed and rotated down to the last 100 KB on each reboot.</div></div></div></div><div data-aura-rendered-by="33:176;a" id="bkmrk-"></div><div class="slds-col slds-grid slds-has-flexi-truncate has-tooltip full long-text forcePageBlockItem forcePageBlockItemView" data-aura-class="forcePageBlockItem forcePageBlockItemView" data-aura-rendered-by="35:176;a" data-target-selection-name="sfdc:RecordField.Knowledge__kav.Content__c" id="bkmrk-deploy%E2%80%91filewave.ps1-"><div class="slds-form-element slds-form-element_readonly slds-grow slds-hint-parent override--slds-form-element hover" data-aura-rendered-by="36:176;a"><div data-aura-rendered-by="33:176;a">  
</div><div data-aura-rendered-by="33:176;a">**Deploy‑FileWave.ps1 script:**</div><div data-aura-rendered-by="33:176;a">  
</div></div></div>```powershell
<#
.SYNOPSIS
    Deploys the FileWave agent via a Group Policy startup script, always logging output.
.DESCRIPTION
    Checks whether the FileWave process is running; if not, copies the MSI from the network share
    to a persistent local directory and installs it in silent mode. All verbose, warning, and error output
    is logged to C:\temp\Deploy-FileWave.log, trimmed to the last 100 KB at each run.
.NOTES
    - Verbose output is forced by setting $VerbosePreference = 'Continue'.
#>

# Force verbose output so all Write-Verbose messages appear in transcript
$VerbosePreference = 'Continue'

# Define directories and log files
$logDir = 'C:\temp'
$logFile = Join-Path -Path $logDir -ChildPath 'Deploy-FileWave.log'
$maxBytes = 100KB

# Persistent MSI cache location
$cacheDir = 'C:\ProgramData\FileWave\MSICache'
$msiName = 'FileWaveCustom.msi'
$installerLocalPath = Join-Path -Path $cacheDir -ChildPath $msiName
$installerSharePath = '\\server\share\FileWaveCustom.msi'  # Update to your actual UNC path

# Ensure the log directory exists
if (-not (Test-Path -Path $logDir)) {
    try {
        New-Item -Path $logDir -ItemType Directory -Force | Out-Null
    } catch {
        Write-Error "Failed to create log directory '$logDir': $_"
        Exit 1
    }
}

# Trim existing log to last 100 KB
if (Test-Path -Path $logFile) {
    try {
        $fs = [System.IO.File]::Open($logFile, 'Open', 'ReadWrite')
        if ($fs.Length -gt $maxBytes) {
            $buffer = New-Object byte[] $maxBytes
            $fs.Seek(-$maxBytes, 'End') | Out-Null
            $fs.Read($buffer, 0, $maxBytes) | Out-Null
            $fs.SetLength(0)
            $fs.Write($buffer, 0, $maxBytes)
        }
        $fs.Close()
    } catch {
        Write-Warning "Failed to trim log file: $_"
    }
}

# Start transcript logging
Start-Transcript -Path $logFile -Append
Write-Verbose "Transcript started at '$logFile'."

# Check if FileWave agent is already running
$ProcessName = 'fwcld'
Write-Verbose "Checking for process '$ProcessName'..."
try {
    Get-Process -Name $ProcessName -ErrorAction Stop | Out-Null
    Write-Verbose "Process '$ProcessName' is currently running."
    $isRunning = $true
} catch {
    Write-Verbose "Process '$ProcessName' not found. Proceeding with installation."
    $isRunning = $false
}

if (-not $isRunning) {
    Write-Verbose "Deploying FileWave agent..."

    # Ensure the MSI cache directory exists
    if (-not (Test-Path -Path $cacheDir)) {
        try {
            New-Item -Path $cacheDir -ItemType Directory -Force | Out-Null
            Write-Verbose "Created MSI cache directory: $cacheDir"
        } catch {
            Write-Error "Failed to create MSI cache directory '$cacheDir': $_"
            Stop-Transcript
            Exit 1
        }
    }

    # Copy MSI from network share if not already present
    if (-not (Test-Path -Path $installerLocalPath)) {
        Write-Verbose "Copying MSI from '$installerSharePath' to '$installerLocalPath'..."
        try {
            Copy-Item -Path $installerSharePath -Destination $installerLocalPath -Force
            Write-Verbose "Successfully copied MSI to local cache."
        } catch {
            Write-Error "Failed to copy installer: $_"
            Stop-Transcript
            Exit 1
        }
    } else {
        Write-Verbose "MSI already cached locally at '$installerLocalPath'."
    }

    # Install MSI silently and log output
    $installLog = Join-Path -Path $env:TEMP -ChildPath 'FileWaveInstall.log'
    $msiArgs = "/i `"$installerLocalPath`" /qn /norestart /l*vx `"$installLog`""

    Write-Verbose "Starting MSI installation. Command: msiexec.exe $msiArgs"
    $process = Start-Process -FilePath 'msiexec.exe' -ArgumentList $msiArgs -Wait -PassThru
    if ($process.ExitCode -eq 0) {
        Write-Verbose "Installation completed successfully (exit code 0). Log: '$installLog'."
    } else {
        Write-Error "MSI installation failed (exit code $($process.ExitCode)). See '$installLog'."
        Stop-Transcript
        Exit $process.ExitCode
    }

    Write-Verbose 'FileWave installation process finished.'
} else {
    Write-Verbose "Skipping deployment; '$ProcessName' already running."
}

# Stop transcript logging
Stop-Transcript
Write-Verbose "Transcript stopped. Log written to '$logFile'."
```