WVD launching 2 instances of the App executable.

Copper Contributor

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 executable runs for that app per-user across multiple hosts in WVD.

 

The scenario:
- User starts app, uses it for a while and disconnects the session. The disconnected session continues to run on the host in a disconnected state
- User starts app again. WVD starts a new instance of the executable *and* re-open the first session’s instance. So the user now has 2 windows open of the same app (this also consumes 2 of our licences for the application which we need to avoid)

 

We’re yet to test an app with multiple hosts but we need WVD to reconnect any existing session executable – not start additional at any time.

 

I'm aware I can do some GPO-style changes that will log off a disconnected session but in other application publishing technologies, they have controls around allowing only 1 instance of an app per-user across all servers in an environment... I'm looking for this option.

4 Replies

@gavin1245 

What 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.

@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. 

Bobby_Powers_0-1614892806315.png

 

@Bobby_Powers did you solve your issue?
I have the same problem and want to limit the user session to one instance of the app.

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>}