Skip to main content

DUO Install & Upgrade - Latest Version

Summary

This script will install or update DUO if the currently installed instance is older than the latest released version.
The script matches the hash of the installer from the official website before deploying it.
It downloads the latest installer from https://dl.duosecurity.com/duo-win-login-latest.exe.

Sample Run

First Run: Run the script against any online Windows machine with the Set_Environment parameter set to 1 to create the EDFs used by the solution.
First Run

Regular Execution:
Regular Execution

Requirements

  1. Specific EDF values must be set for this to work properly
    The EDFs used are:

    Client-Level:
    Client-Level EDF

    • EDFs in box 1 are used with the ExtraDataGet function and will be imported with the script.
    • EDFs in section 2 will not be imported with the script and are necessary to define the value of the @Arguments@ variable.
    • To import all the EDFs present in section 2, run the script against any online Windows machine with the Set_Environment parameter set to 1.
  2. Overrides should be set at the computer level, as shown below:
    Overrides

  3. Exclusions EDFs:
    Client Exclusion EDF:
    Client Exclusion EDF

    Location Exclusion EDF:
    Location Exclusion EDF

    Computer Exclusion EDF:
    Computer Exclusion EDF

    Exclusions EDFs are used with the ExtraDataGet function and will be imported with the script.

  4. Script EDFs:
    Duo Authentication Version:
    This EDF was introduced as script/monitor is not installing or updating DUO on machines where the application version is not detected in the Software tab. This EDF is filled by the Script itself. Computer-Level EDF

EDFs

NameRequiredDescription
AUTOPUSHFalseIf set to "Yes", this option will automatically send a push request to the user’s device when they attempt to log in. The default value is blank, which requires the user to manually request the push.
FAILOPENFalseThis determines the behavior when Duo’s service cannot be reached. If set to "Yes", the system will allow the user to log in (fail open). If set to "No" or left blank, the system will deny access (fail closed). The default is to fail closed.
RDPONLYFalseWhen set to "Yes", Duo authentication is required only for remote logins via RDP. If set to "No" or left blank, Duo authentication is required for both console and RDP logins. The default is blank, meaning Duo protects both.
SMARTCARDFalseIf set to "Yes", it allows smart card login as an alternative to Duo authentication. If set to "No" or left blank, it disables the Windows smart card provider. The default is blank, which does not allow smart card login without Duo approval.
ENABLEOFFLINEFalseIf set to "Yes", it will control whether offline access is permitted. In the context of Duo, offline access allows users to authenticate without a real-time connection to Duo’s service, usually by using previously generated passcodes or other offline methods.
IKEYTrueThis is a unique identifier for your integration with Duo’s service. It’s used to link the authentication requests from your application to the correct Duo account. You can find the IKEY in your Duo Admin Panel under the application’s properties page.
SKEYTrueThis is a sensitive piece of information, akin to a password, used in conjunction with the IKEY. The SKEY is used to sign communication between your application and Duo’s service securely. It’s crucial to keep this key confidential to prevent unauthorized access.
HKEYTrueThe Host Key or API Hostname, which is the endpoint in Duo’s service that your application communicates with. This hostname is also found in the Duo Admin Panel and is necessary for setting up the integration.
Duo Authentication VersionFalseThis EDF was introduced as script/monitor is not installing or updating DUO on machines where the application version is not detected in the Software tab. It holds the Duo version installed on the machine. This EDF is filled by the Script itself.

Note: These arguments are passed during the installation process to set up the desired configuration for how Duo Authentication will operate on the Windows system. It’s important to note that the parameter names are case-sensitive.
Here’s an example of how you might use these arguments in a command to install Duo Authentication for Windows Logon:

duo-win-login-latest.exe /S /V"/qn IKEY=\"Your_IKEY\" SKEY=\"Your_SKEY\" HOST=\"Your_HOST\" AUTOPUSH=\"#1\" FAILOPEN=\"#1\" SMARTCARD=\"#1\" RDPONLY=\"#0\""

Variables

NameDescription
HostTo store the value of the Client level EDF, DUO HOST
SKEYTo store the value of the Client level EDF, DUO SKEY
IKEYTo store the value of the Client level EDF, DUO IKEY
ArgumentsArguments to be passed to the command, calculated by a SQL query based on the client and computer level "DUO - *" EDFs.
DuoFileNameName of the file present at https://dl.duosecurity.com/duo-win-login-latest.exe
FileMajorVersion@DuoFileName@ will come along with a numeric version, and that version is extracted and stored to the FileMajorVersion
RawHashHash value for the @DuoFileName@ at https://duo.com/docs/checksums#duo-windows-logon
FileHashHash value for the file downloaded from https://dl.duosecurity.com/duo-win-login-latest.exe
ApplicationVersionVersion of the file downloaded from https://dl.duosecurity.com/duo-win-login-latest.exe
InstallComparison@ApplicationVersion@ is compared with the version of the currently installed instance to determine whether DUO is Not Installed, Out Of Date, or Up To Date.
%shellresult%Outcome of the installation command executed

Global Variables

NameExampleRequiredDescription
OutFileC%3A%5CWindows%5CLTSvc%5CPackages%5CDuoInstaller.exeTrueFull path to download DUOInstaller.exe
OutFolderC%3A%5CWindows%5CLTSvc%5CPackagesTrueFolder to store the DUOInstaller.exe

User Parameters

NameExampleRequiredDescription
Set_Environment1True (for first execution)Run the script with the Set_Environment parameter set to 1 to create the EDFs used by the solution.

Output

  • Script log