Deploy Client with Focus Enabled

Discussion in 'Windows' started by Almighty Burrito, Jan 27, 2017.

Thread Status:
Not open for further replies.
  1. Almighty Burrito

    Dec 27, 2016
    Likes Received:
    Is it possible to configure the 3cx Windows Desktop client to have the Focus option enabled by default? I can't seem to find anything online for it and I don't see an existing option in the templates or the parameters settings in the 3cx management console.
  2. dan_tx

    Nov 3, 2016
    Likes Received:
    I believe 3CX is working on this type of option, to control the 3CX windows client settings in bulk and before deploying. It's mentioned in the 3CX Ideas forum.

    I cut and past some command prompt and powershell scripts that can be ran on computers remotely to configure them after deployment. If you have a program that can run commands remotely (PDQ Deploy) then this is how we do it for now. I know this isn't "clean" but it works for us. It is only designed for Windows 7

    Basically push out the MSI however you want, via GPO or other programs can do it. Then email the welcome email to everyone, they open it up and it's configured to at least work. Once they do that, make these files and move to a network folder share, then modify them however you want. You can combine most of this into a single job, but you get the idea.

    Kills 3cx App. Must be closed to modify the 3cx xml file for the client.
    taskkill /f /im 3CXWin8Phone.exe
    Command Prompt command to check C:\users, if they have 3cxphone installed for that user, copy the Company Header image , copy the powershel script, and run the powershell script for them. Replace *NETWORKPATH* with the location you put the scripts and files.

    for /d %%A in (C:\Users\*) do if exist "%%A\AppData\Roaming\3CXPhone for Windows\" cd %%A\AppData\Roaming\3CXPhone for Windows && copy /y *NETWORKPATH*\3cxscript.ps1 && copy /y *NETWORKPATH*\HeaderImage.jpeg "C:\ProgramData\3CXPhone for Windows\PhoneApp\HeaderImage.jpeg" && powershell -ExecutionPolicy ByPass -File .\3cxscript.ps1
    Start back up the 3cx App
    cd C:\ProgramData\3CXPhone for Windows\PhoneApp\
    start 3CXWin8Phone.exe

    Powershell script that goes in the same network path as the Header image you create for the company.
    When you run the command prompt command above, this is dropped in the users Appdata folder where the 3cxphone .xml is located, scans the .xml file for certain variable and replaces them with the settings you want. You can add or remove as many settings as you want by adding more "-replace" lines. You do have to be exact but the default settings are the same for all the new installs. The below does what we want for now, which is add the logo, bring to front application on calls and instant messaging, and changes the theme.
    Set-ExecutionPolicy RemoteSigned
    $original_file = '3CXPhone.xml'
    $destination_file =  '3CXPhone.xml'
    (Get-Content $original_file) | Foreach-Object {
        $_ -replace '<IsCustomImageSet>False</IsCustomImageSet>', '<IsCustomImageSet>True</IsCustomImageSet>' `
           -replace '<CustomImagePath></CustomImagePath>', '<CustomImagePath>C:\ProgramData\3CXPhone for Windows\PhoneApp\HeaderImage.jpeg</CustomImagePath>' `
           -replace '<ApplicationTheme>3</ApplicationTheme>', '<ApplicationTheme>1</ApplicationTheme>' `
           -replace '<ApplicationTheme>2</ApplicationTheme>', '<ApplicationTheme>1</ApplicationTheme>' `
           -replace '<StealFocusOnIncomingCall>False</StealFocusOnIncomingCall>', '<StealFocusOnIncomingCall>True</StealFocusOnIncomingCall>' `
           -replace '<AutomaticallyOpenChatWindow>False</AutomaticallyOpenChatWindow>', '<AutomaticallyOpenChatWindow>True</AutomaticallyOpenChatWindow>' `
        } | Set-Content $destination_file
    kyle dee and Almighty Burrito like this.
Thread Status:
Not open for further replies.