It might be useful to be able to show different Taskbar content based on user groups (eithe Cameyo groups or SSO groups).


To achieve that, please use the following script in your StartupBefore.ps1 (Session scripting (Windows) ) and change it to your needs, see also Cameyo Task Bar:


$groups = $env:SSO_GROUPS -split ","
if ($groups -contains "Finance") {
    $env:CAMEYO_TASKBAR_QUICKLAUNCH="Navision|navision.exe;SAP|sapclient.exe"
    Stop-Process -Name CyoDesktop
    Start-Process "C:\Program Files\CyoDesktop\CyoDesktop.exe"
}

if ($groups -contains "Sales") {
    $env:CAMEYO_TASKBAR_QUICKLAUNCH="SAP|sapclient.exe"
    Stop-Process -Name CyoDesktop
    Start-Process "C:\Program Files\CyoDesktop\CyoDesktop.exe"
}

If you want to use local groups instead of SSO groups, use the follwing variable:

$groups = $env:GROUP_ID

you don't need to split it since you can only assign one group at the time



Since we are terminating the original TaskBar and restarting it with new settings, everything that has been set through PowerTags (!TASKBAR_QUICKLAUNCH=) will be overwritten!
To avoid that it gets overwritten, you change the script according to the below:

Adding the existing environment variable will extend the setting with a possible set PowerTag
if ($groups -contains "Sales") {
    $env:CAMEYO_TASKBAR_QUICKLAUNCH="SAP|sapclient.exe";$env:CAMEYO_TASKBAR_QUICKLAUNCH
    Stop-Process -Name CyoDesktop
    Start-Process "C:\Program Files\CyoDesktop\CyoDesktop.exe"
}
Be aware that you need to expand the question mark (!) of a PowerTag with "CAMEYO":
!TASKBAR_QUICKLAUNCH -> CAMEYO_TASKBAR_QUICKLAUNCH