Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

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

    Joined:
    Dec 27, 2016
    Messages:
    14
    Likes Received:
    6
    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

    dan_tx New Member

    Joined:
    Nov 3, 2016
    Messages:
    105
    Likes Received:
    29
    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.
    Code:
    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.

    Code:
    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
    Code:
    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.
    Code:
    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.