You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we start the RDP sessions from the SPP web page, Scalus opens the Windows cmd line, shows some commands and it closes.
Would it be possible to run it silently to avoid disturbing users during the connection establishment?
EDIT, adding wall of text: It seems to be hardcoded to run scalus maximized in the terminal window, either by design or by a windows terminal bug. So i guess that has to be changed in the way Scalus open windows terminal in the sourcecode. As a workaround I even tried creating my own script that looks for the terminal process and a tab/windows called "C:\Program Files\SCALUS\scalus.exe" because I have done something similar before. I could get it closed automatically by running the script as admin and editing this values:
$WindowPartialTitle = "C:\Program Files\SCALUS\scalus.exe" # Part of the title of the dialog to close
$TargetProcessName = "windowsterminal" # Name of the target process
But as mention over there seem to be no way to minimizing the window or closing the tab. I'm not sure if it's a bug or a feature... And to auto close the windows you have to run the script as admin because windows terminal is started in that context, that will require running the script as a scheduled task running as admin, or creating a service doing the same, and it will need to trigger automatically when scalus.exe starts (not easy), or at system startup looking for the process constantly (consuming cpu cycles). And then you need to remove the part looking for windows terminal before the script would start.
But the the easy workaround is to limit the amount of data that's being shown to the user. This is done by editing the config file called "appsettings.json" in the folder "C:\Program Files\SCALUS". By changing the value "Console": true to false only the text community edition will now show in the terminal:
For all parameters I copy pasted from the wiki here:
Configuration
appsettings.json can be used to customize the runtime SCALUS behavior. Set MinLevel to Debug to get more detailed log file output. Set Console to true to log to the console window. Configuration files are stored in the user's profile folder as determined by the OS. Use the scalus info command to see full paths to log and configuration files.
Session Client Application Launch Uri System (SCALUS)
Copyright (c) 2022 One Identity LLC
info Show information about the current SCALUS configuration
launch Launch an app configured for the specified URL
register Register SCALUS to handle URLs
ui (Default Verb) Run the configuration UI
unregister Unregister SCALUS for URL handling
verify Run a syntax check on a SCALUS configuration file
help Display more information on a specific command.
version Display version information.
I found a method to also run the windows minimized by creating the following .ps1 script, but of course this script has to be started before using scalus as a startupscript or as a scheduled task since it monitoring prosesses for windows title and minimizing it:
<#.SYNOPSIS Polls for a specific Windows Terminal tab and minimizes its window when found..PARAMETERMatch Ending substring of the tab title to match (default: full path to scalus.exe)..PARAMETERAggressiveInterval Seconds between checks during the aggressive phase (default: 2)..PARAMETERAggressiveTimeout Maximum seconds to spend in the aggressive phase (default: 120)..PARAMETERIdleInterval Seconds between checks during the idle phase (default: 30)..PARAMETERIdleTimeout Maximum seconds to spend in the idle phase; 0 = indefinite (default: 0)..PARAMETERExitAfterMinimize If specified, exit immediately once minimized; otherwise continue idle polling..EXAMPLE # Aggressive 1s interval for 60s, then idle 15s indefinitely, exit on minimize .\MinimerRPD.ps1 -Match "scalus.exe" -AggressiveInterval 1 -AggressiveTimeout 60 ` -IdleInterval 15 -IdleTimeout 0 -ExitAfterMinimize#>param(
[string]$Match='C:\Program Files\SCALUS\scalus.exe',
[int] $AggressiveInterval=2,
[int] $AggressiveTimeout=120,
[int] $IdleInterval=30,
[int] $IdleTimeout=0,
[switch]$ExitAfterMinimize
)
# Resolve log file path in the user’s TEMP folder$LogFile=Join-Path$env:TEMP'MinimerRPD.log'# Start logging"===== Script start: $(Get-Date-Format s) ====="|Out-File$LogFile-Encoding utf8
"Parameters: Match='${Match}', AggressiveInterval=${AggressiveInterval}, AggressiveTimeout=${AggressiveTimeout}, IdleInterval=${IdleInterval}, IdleTimeout=${IdleTimeout}, ExitAfterMinimize=${ExitAfterMinimize}"|Add-Content$LogFile# Load Win32 API for minimizing windows (SW_MINIMIZE = 6)Add-Type-MemberDefinition @' [DllImport("user32.dll")] public static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);'@-Name Win32 -Namespace Native
# --------- Aggressive polling phase ---------$swAggressive= [Diagnostics.Stopwatch]::StartNew()
while ($swAggressive.Elapsed.TotalSeconds-lt$AggressiveTimeout) {
$ts=Get-Date-Format s
$wins=Get-Process-Name WindowsTerminal -ErrorAction SilentlyContinue |Where-Object { $_.MainWindowTitle.EndsWith($Match, [StringComparison]::OrdinalIgnoreCase) }
if ($wins) {
"${ts}: [Aggressive] Found $($wins.Count) matching window(s). Minimizing..."|Add-Content$LogFileforeach ($win$wins) { [Native.Win32]::ShowWindowAsync($w.MainWindowHandle,6) |Out-Null }
"${ts}: [Aggressive] Window(s) minimized."|Add-Content$LogFileif ($ExitAfterMinimize) {
"${ts}: ExitAfterMinimize specified; exiting now."|Add-Content$LogFileexit
}
break
}
"${ts}: [Aggressive] No match yet. Sleeping ${AggressiveInterval}s..."|Add-Content$LogFileStart-Sleep-Seconds $AggressiveInterval
}
"${([DateTime]::Now.ToString('s'))}: Aggressive phase complete."|Add-Content$LogFile# --------- Idle polling phase ---------$swIdle= [Diagnostics.Stopwatch]::StartNew()
while ($IdleTimeout-eq0-or$swIdle.Elapsed.TotalSeconds-lt$IdleTimeout) {
$ts=Get-Date-Format s
$wins=Get-Process-Name WindowsTerminal -ErrorAction SilentlyContinue |Where-Object { $_.MainWindowTitle.EndsWith($Match,[StringComparison]::OrdinalIgnoreCase) }
if ($wins) {
"${ts}: [Idle] Found $($wins.Count) matching window(s). Minimizing..."|Add-Content$LogFileforeach ($win$wins) {
[Native.Win32]::ShowWindowAsync($w.MainWindowHandle,6) |Out-Null
}
if ($ExitAfterMinimize) {
"${ts}: ExitAfterMinimize specified; exiting now."|Add-Content$LogFilebreak
}
# ellers: fortsett å poll’e
}
else {
"${ts}: [Idle] No match. Sleeping ${IdleInterval}s..."|Add-Content$LogFile
}
Start-Sleep-Seconds $IdleInterval
}
"===== Script end: $(Get-Date-Format s) =====`n"|Add-Content$LogFile
Activity
nawazsarwar124 commentedon Sep 21, 2023
Did you find a way to start the session silently?
Sqweeksyg commentedon Sep 25, 2023
Not yet...
@JaredCuster do you have any news?
Thank you!
nircamon82 commentedon Jun 26, 2024
Hi, any news on that? did you find a way to start it silently?
uobnsturner commentedon Oct 22, 2024
Would be great if this silent opening could be done.
altiris4ever commentedon Oct 25, 2024
EDIT, adding wall of text: It seems to be hardcoded to run scalus maximized in the terminal window, either by design or by a windows terminal bug. So i guess that has to be changed in the way Scalus open windows terminal in the sourcecode. As a workaround I even tried creating my own script that looks for the terminal process and a tab/windows called "C:\Program Files\SCALUS\scalus.exe" because I have done something similar before. I could get it closed automatically by running the script as admin and editing this values:
$WindowPartialTitle = "C:\Program Files\SCALUS\scalus.exe" # Part of the title of the dialog to close
$TargetProcessName = "windowsterminal" # Name of the target process
But as mention over there seem to be no way to minimizing the window or closing the tab. I'm not sure if it's a bug or a feature... And to auto close the windows you have to run the script as admin because windows terminal is started in that context, that will require running the script as a scheduled task running as admin, or creating a service doing the same, and it will need to trigger automatically when scalus.exe starts (not easy), or at system startup looking for the process constantly (consuming cpu cycles). And then you need to remove the part looking for windows terminal before the script would start.
But the the easy workaround is to limit the amount of data that's being shown to the user. This is done by editing the config file called "appsettings.json" in the folder "C:\Program Files\SCALUS". By changing the value "Console": true to false only the text community edition will now show in the terminal:
For all parameters I copy pasted from the wiki here:
Configuration
appsettings.json can be used to customize the runtime SCALUS behavior. Set MinLevel to Debug to get more detailed log file output. Set Console to true to log to the console window. Configuration files are stored in the user's profile folder as determined by the OS. Use the scalus info command to see full paths to log and configuration files.
{
"Logging": {
"FileName": "scalus.log",
"MinLevel": "Information",
"Console": true
},
"Configuration": {
"FileName": "scalus.json"
}
}
Usage
SCALUS command-line usage:
Session Client Application Launch Uri System (SCALUS)
Copyright (c) 2022 One Identity LLC
info Show information about the current SCALUS configuration
launch Launch an app configured for the specified URL
register Register SCALUS to handle URLs
ui (Default Verb) Run the configuration UI
unregister Unregister SCALUS for URL handling
verify Run a syntax check on a SCALUS configuration file
help Display more information on a specific command.
version Display version information.
altiris4ever commentedon Jul 4, 2025
I found a method to also run the windows minimized by creating the following .ps1 script, but of course this script has to be started before using scalus as a startupscript or as a scheduled task since it monitoring prosesses for windows title and minimizing it:
Usage examples
Default behavior (no parameters):
Exit immediately after minimize:
.\MinimerRPD.ps1 -ExitAfterMinimizeCustom aggressive phase:
Limited idle phase:
Fully customized: