# Uninstall / reinstall

It is important to uninstall any previous versions of the Keyfax Client, which may already be installed on each PC before installing a later version.

{% hint style="warning" %}
**IMPORTANT** Before uninstalling, check that user(s) have logged out of the the host system on this PC/Terminal/Citrix Server otherwise successful uninstallation or reinstallation cannot be guaranteed.
{% endhint %}

To uninstall any previous version, from the start menu, select 'Settings - Control Panel - Add/Remove Programs' and select 'Keyfax', then click 'Change/Remove'.&#x20;

When the uninstall dialog displays, choose 'Automatic' for the first screen, 'No' for the second, then while the files are being removed you may be asked if you want to remove a shared component; answer 'Yes to All' to continue.\
\
Where large numbers of client machines are involved, it may be more practical to script the uninstall process. The following command will perform a Silent uninstall

* **C:\Progra\~1\Keyfax\UnWise.exe /S C:\Progra\~1\Keyfax\INSTALL.LOG**&#x20;

An alternative approach is to use Scripts to perform the task (note: this is not intended to be an exhaustive list of alternatives):

1. Example of scripted uninstall and reinstall using Kickstart

{% hint style="info" %}
**NOTE** These examples are for illustrative purposes only. We appreciate there have and continue to be many developments in this field and there are a plethora of techniques/approaches. No support or assistance is implied for your adopted mechanism.
{% endhint %}

This is an example of a scripted uninstall and reinstall using Kickstart. ( Kickstart lets you write scripts using a simple Basic like language).

```
if $TSClient=$False and $IsServer=$False 
    $wsKeyfaxInstallVersion = "1.00" 
    if exist("%windir%\ituadmin\KeyfaxInstall\Version$wsKeyfaxInstallVersion.txt") = $False 
      if exist("%windir%\ituadmin\KeyfaxInstall\Version*.txt") = $True 
          del "%windir%\ituadmin\KeyfaxInstall\Version*.txt" 
      endif 
      "   Installing Keyfax..." 
      ; Uninstall previous version 
      if exist("%SystemDrive%\Progra~1\Keyfax\INSTALL.LOG") = $True 
          shell '"%SystemDrive%\Progra~1\Keyfax\UNWISE.EXE" /S C:\Progra~1\Keyfax\INSTALL.LOG' 
      endif 
      ; Install new version 
      shell '\\WEBSERVER\KFinstallationCD\KF40client_4-0-0-7.exe /S' 
      ; Create version stamp 
      if exist("%windir%\ituadmin") = $False 
          md "%windir%\ituadmin" 
      endif 
      if exist("%windir%\ituadmin\KeyfaxInstall") = $False 
          md "%windir%\ituadmin\KeyfaxInstall" 
      endif 
      $x = RedirectOutput("%windir%\ituadmin\KeyfaxInstall\Version$wsKeyfaxInstallVersion.txt",1) 
      "Keyfax Install Version $wsKeyfaxInstallVersion" 
      $x = RedirectOutput("") 
      "Done.@crlf" 
    endif 
endif
```

2. Example of scripted uninstall and reinstall using BAT script

**KEYFAXU.BAT (the uninstall):**

```
echo off Title Uninstall of old Keyfax - DO NOT CLOSE THIS WINDOW!
if not exist "C:\program files\keyfax\testocx.exe" goto end 
if exist C:\keyinst.txt goto end
c: 
cd\progra~1\keyfax unwise.exe /s INSTALL.LOG /z
call \\fileserver\netlogon\keyfax40.bat 
echo. > c:\keyinst.txt
:end
```

**KEYFAX40.BAT (the install):**

```
echo off
Title Install of new Keyfax client - DO NOT CLOSE THIS WINDOW!
%logonserver%\netlogon\keyfax\KF40client_4-0-0-7.exe /S
```

Once the product is installed the control file keyinst.txt is written to the c: drive to prevent continual re-installation. Once all client machines are upgraded, the startup script can be removed.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.keyfax.biz/product-suite/client/installation/uninstall-reinstall.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
