Custom Mouse Cursor settings are reverted to default theme settings during RES Workspace Manager Session

Version 1

    Problem

    Consider the following scenario:
    • User settings for Mouse Settings (Template from RES Workspace Manager) and user settings for Windows 7 Theme (Template from RES ONE Workspace ) are configured.
    • During the session the user changes the mouse cursor setting to another theme. The user logs off and on again.
    During the logon the user settings are loaded but the cursor theme is not being restored.

     

    Cause

    This is default behavior in this situation because the Windows 7 Theme restore of the user settings will trigger a Theme registration command provided by Microsoft Windows.

     

    Solution

    The following workaround can be used to resolve this issue:

    Workaround:

    Create a RES ONE Workspace Manager managed application that will restore the mouse cursor settings.

    The Application should be configured with the following settings:

    Properties: On the settings tab configure the 'Autolaunch at session start' to Mandatory and configure 'Hide application' (if desired). 
    User settings: Capture targeted Item on Session end with the following Registry Tree: HKEY_Current_User\Control Panel\Cursors
    Configuration: Create an execute command under the Actions tab 'At application start'.
    Properties tab: set the command line to: 'Powershell.exe %script%' and check 'Run Hidden'.
    Script tab:
    $CSharpSig = @'

    [DllImport("user32.dll", EntryPoint = "SystemParametersInfo")]

    public static extern bool SystemParametersInfo(

                     uint uiAction,

                     uint uiParam,

                     uint pvParam,

                     uint fWinIni);

    '@

    $CursorRefresh = Add-Type -MemberDefinition $CSharpSig -Name WinAPICall -Namespace SystemParamInfo -PassThru
    $CursorRefresh::SystemParametersInfo(0x0057,0,$null,0)

    File extension of script: ps1

    This script will ensure that the Mouse cursor will be refreshed within the session.