Forum Discussion
gavin1245
Nov 09, 2020Copper Contributor
WVD launching 2 instances of the App executable.
Hello, PoC WVD (ARM) host pool with single host, we're seeing multiple instances of an app (executable) run on a host after a session is disconnected. We want to ensure only 1 instance of the exe...
Soo Kuan Teo
Microsoft
Nov 16, 2020What remote app are you using that exhibit this issue? It may be app specific. Can you try with other apps to see if you can repro the issue? I just tried office apps (excel, word), i'm not able to reproduce your issue.
Bobby_Powers
Mar 04, 2021Copper Contributor
Soo Kuan Teo I've had this issue with multiple applications (SSMS, Power BI Desktop, multiple 3rd party applications). You have to launch the remote app in order to reconnect to a previous session but by doing so you are launching a second instance of the application.
- AMelanderFeb 10, 2022Copper ContributorBobby_Powers did you solve your issue?
I have the same problem and want to limit the user session to one instance of the app.- gavin1245Feb 10, 2022Copper Contributor
I changed my AVD (WVD) Application to launch PowerShell with a -File and script path Command line parameter. In the PowerShell script I used something like this:
$id = [System.Diagnostics.Process]::GetCurrentProcess().SessionId $process = (Get-Process -Name <executable> | ? {$_.si -eq $id}) if ($process) {'You already have an instance of Application running, additional instance will not be started.'} else {Start-Process -FilePath <executable path>}