All Products
Search
Document Center

Elastic Desktop Service:Integrate a Windows or macOS plug-in to a third-party application

Last Updated:Jul 11, 2024

Alibaba Cloud Workspace plug-in integration helps customers to integrate the plug-ins of the Alibaba Cloud Workspace client to third-party applications to implement specific business requirements.

This topic describes how to integrate plug-in of the Alibaba Cloud Workspace client for Windows or macOS to third-party applications. This way, customers can integrate Elastic Desktop Service (EDS) capabilities by using the Alibaba Cloud Workspace client. The plug-in-based integration combines customer strengths and EDS to deliver better virtualization solutions and create more business value.

Before you start

Platform signing

Sign a third-party cooperation contract with Alibaba Cloud Workspace, register in the Alibaba Cloud OpenAPI Explorer platform for EDS, and obtain permissions and credentials to access the EDS API.

For information about the Alibaba Cloud OpenAPI Explorer platform for EDS, see List of operations by function.

Plug-in installation

Plug-in of the Alibaba Cloud Workspace client for macOS: https://ecd-client.oss-cn-shanghai.aliyuncs.com/wuying/mac1015/wuying-setup.dmg

Plug-in of the Alibaba Cloud Workspace client for Windows: https://ecd-client.oss-accelerate.aliyuncs.com/wuying/windows10/wuying-setup.exe

Silent installation

If silent installation is required, refer to the following code based on the OS:

Important

Before silent installation starts, make sure that the plug-in is installed. Refer to Appendix 1 to check whether the plug-in is installed.

Windows:

wuying-setup.exe /sp- /verysilent /norestart /nocancel
Note

After the plug-in of the Alibaba Cloud Workspace client for Windows is installed, a shortcut to the client and start menu are displayed on the desktop of your local computer. If you want to delete them, refer to Appendix 3.

macOS:

hdiutil attach wuying-setup.dmg -mountpoint /Volumes/AliyunEds -nobrowse 
&& cp -R /Volumes/AliyunEds/Alibaba Cloud Workspace.app /Applications/Alibaba Cloud Workspace.app 
&& hdiutil detach /Volumes/AliyunEds

Plug-in integration

How to integrate

CLI-based integration

You need to find the plug-in integration service named stream_launcher in Alibaba Cloud Workspace and run the following command to input parameters.

Note

To find the path in which stream_launcher is located, refer to Appendix 1.

macOS:

stream_launcher --param='{"operation": "xxx", xxxxxx}'

Windows:

stream_launcher.exe --param='{"operation": "xxx", xxxxxx}'

File-based integration

You need to save all param content in the JSON format to a file that has the .aspkey extension. You can use a default application to open the file by calling the specified system operation. Then, related operations can be performed on the Alibaba Cloud Workspace client.

Sample file: demo.aspkey

{
  "param": {
    "operation": "xxx"
  }
}

You can also use CLIs to associate files with Alibaba Cloud Workspace.

macOS:

stream_launcher --file="xxx/param.aspkey"
open -a stream_launcher "xxx/param.aspkey"

Windows:

stream_launcher.exe --file="xxx/param.aspkey"

URL scheme-based integration

You can use URL scheme-based integration to connect to cloud computers on the Alibaba Cloud Workspace client. That is, you use wuying:// as the prefix and connect to cloud computers from browsers.

wuying://?param={"operation": "xxx", xxxxxx}

You can also use CLIs to associate URL schemes with Alibaba Cloud Workspace.

macOS:

stream_launcher --url='wuying://?param={"operation": "xxx", xxxxx}'
open 'wuying://?param={"operation": "xxx", xxxxx}'

Windows:

stream_launcher.exe --url='wuying://?param={"operation": "xxx", xxxx}'
start 'wuying://?param={"operation": "xxx", xxxx}'
/// power shell
Start-Process 'wuying://?param={"operation": "xxx", xxxx}'
Note

The Alibaba Cloud Workspace client for Windows supports open SDKs for flexible integration. For more information, see Windows SDK.

Connect to a cloud computer

You need to obtain a ticket to connect to a cloud computer from the Alibaba Cloud OpenAPI Explorer platform for EDS.

Note

You must input a universally unique identifier (UUID) to obtain a ticket. Refer to Appendix 2 to learn how to obtain a UUID.

Parameters

The following table describes the parameters in the JSON format. You must configure the parameters to connect to a cloud computer.

Parameter

Type

Required

Description

Example

operation

String

Yes

The operation that you want to perform.

openDesktop

  • bizParam

object

Yes

The connection information that you want to pass.

-- ticket

String

Yes

The ticket that is returned when you call the GetConnectionTicket operation.

-- desktopId

String

Yes

The ID of the cloud computer.

You can call the GetConnectionTicket operation to obtain the value.

ecd-7nvbz4ccjly95xxxx

-- desktopName

String

Yes

The name of the cloud computer.

You can call the GetConnectionTicket operation to obtain the value.

cloud-computer-A

-- osType

String

Yes

The OS of the cloud computer.

You can call the GetConnectionTicket operation to obtain the value.

windows

  • partnerInfo

object

Yes

The information about the partner company that calls Alibaba Cloud Workspace services.

-- partner

String

Yes

The name of the partner company.

Company A

-- partnerApp

String

Yes

The name of the application from the partner company.

Application B

  • extInfo

object

No

The additional information. This parameter can be used for external configurations.

-- language

String

No

The system language. After you configure the language settings, all windows of the cloud computer are displayed in the specified language. By default, Chinese is used.

"zh" --- Chinese

"en" --- English

-- cloudDpi

int

No

The default dots per inch (DPI) settings when the cloud computer is started.

  • This parameter can be configured only when a Windows cloud computer is started. If you do not have any special business requirements, skip this parameter.

  • The parameter is an integer between 100 and 200. Unit: percentage (%). Example: 150.

100

-- fullscreen

bool

No

Specifies whether to connect to the cloud computer when its desktop is in full-screen mode.

  • This parameter is required only when the system receives a request to connect to a cloud computer. If you do not have any special business requirements, skip this parameter.

true

-- isVpc

bool

No

Specifies whether to connect to the cloud computer over a virtual private cloud (VPC).

  • This parameter is required only when the system receives a request to connect to a cloud computer. If you do not have any special business requirements, skip this parameter.

false

-- hideFloatingBall

bool

No

Specifies whether to hide DesktopAssistant on the desktop of the cloud computer.

  • This parameter is required only when the system receives a request to connect to a cloud computer. If you do not have any special business requirements, skip this parameter.

false

  • proxy

object

No

The proxy.

-- type

String

No

The proxy type.

Valid values:

system

socket

HTTP

-- host

String

No

The host of the proxy.

127.x.x.x

-- port

int

No

The proxy port.

50550

-- account

String

No

The proxy account.

-- password

String

No

The proxy password.

Example

JSON format

{
  "operation": "openDesktop",
  "bizParam": {
    "ticket": "xxxxxxxxxxxxxxxxxxxxxxx",
    "desktopId": "ecd-7nvbz4ccjly95xxxx",
    "desktopName": "cloud-computer-A",
    "osType": "windows"
  },
  "partnerInfo": {
    "partner": "wuyingPartnerTest",
    "partnerApp": "WuyingPartnerTestApp"
  },
  "extInfo": {
    "language": "zh",
    "cloudDpi": 150,
    "fullscreen": true,
    "isVpc": true,
    "hideFloatingBall": true,
    "proxy": {
      "type": "system",
      "host": "xxxxxx",
      "port": 1111,
      "account": "xxxx",
      "password": "xxx"
    }
  }

Disconnect from a cloud resource

Parameters

Parameter

Type

Required

Description

Example

operation

String

Yes

The operation that you want to perform.

closeConnection

  • bizParam

object

Yes

The connection information that you want to pass.

-- id

String

Yes

The ID of the cloud resource from which you want to disconnect.

If you want to disconnect from a cloud computer, specify desktopId.

ecd-7nvbz4ccjly95xxxx

  • partnerInfo

object

Yes

The information about the partner company that calls Alibaba Cloud Workspace services.

-- partner

String

Yes

The name of the partner company.

Company A

-- partnerApp

String

Yes

The name of the application from the partner company.

Application B

Example

JSON format

{
  "operation": "closeConnection",
  "bizParam": {
    "id": "ecd-7nvbz4ccjly95xxxx"
  },
  "partnerInfo": {
    "partner": "wuyingPartnerTest",
    "partnerApp": "WuyingPartnerTestApp"
  }
 }

Submit feedback

If you need Alibaba Cloud Workspace technical support, configure the parameters described in the following table when you upload plug-in logs.

Parameters

Parameter

Type

Required

Description

Example

operation

String

Yes

The operation that you want to perform.

feedback

  • partnerInfo

object

Yes

The information about the partner company that calls Alibaba Cloud Workspace services.

-- partner

String

Yes

The name of the partner company.

Company A

-- partnerApp

String

Yes

The name of the application from the partner company.

Application B

Example

JSON format

{
  "operation": "feedback",
  "partnerInfo": {
    "partner": "wuyingPartnerTest",
    "partnerApp": "WuyingPartnerTestApp"
  }
}

Check plug-in update

You must configure the parameters described in the following table when you update stream_launcher.

Parameters

Parameter

Type

Required

Description

Example

operation

String

Yes

The operation that you want to perform.

upgrade

  • partnerInfo

object

Yes

The information about the partner company that calls Alibaba Cloud Workspace services.

-- partner

String

Yes

The name of the partner company.

Company A

-- partnerApp

String

Yes

The name of the application from the partner company.

Application B

Example

JSON format

{
  "operation": "upgrade",
  "partnerInfo": {
    "partner": "wuyingPartnerTest",
    "partnerApp": "WuyingPartnerTestApp"
  }
}

Exit stream_launcher

To exit the Alibaba Cloud Workspace client from third-party applications, partners can call stream_launcher. Only CLI-based integration is supported.

macOS:

stream_launcher --requestExit

Windows:

stream_launcher.exe --requestExit

Appendix 1: Check whether stream_launcher is installed and its storage path is obtained

Run the following script to check whether stream_launcher is installed and obtain the path where stream_launcher is located.

Windows:

#include <Windows.h>
#include <Shlwapi.h>
#include <string>
#include <iostream>

DWORD length = 0;
HRESULT hr = AssocQueryString(0, ASSOCSTR_EXECUTABLE, ".aspkey", NULL, NULL, &length);

if (length == 0) {
    // stream_launcher is not installed.
}

char* path = new char[length + 1];
hr = AssocQueryString(0, ASSOCSTR_EXECUTABLE, ".aspkey", NULL, path, &length);
if (SUCCEEDED(hr)) {
  // path indicates the path where stream_launcher.exe is located.
} else {
  // stream_launcher is not installed.
}

macOS:

#import <Foundation/Foundation.h>
#import <CoreServices/CoreServices.h>

NSString *extension = @"aspkey";
CFStringRef exUTI = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)(extension), NULL);
if (exUTI) {
    CFURLRef appURL = LSCopyDefaultApplicationURLForContentType(exUTI, kLSRolesAll, NULL);
    if (appURL) {
        // appPath indicates the path where stream_launcher is located.
        NSString *appPath = [(__bridge NSURL*)appURL path];
        CFRelease(appURL);
    } else {
        // stream_launcher is not installed.
        NSLog(@"No default application found for .%@ files", extension);
    }
    CFRelease(exUTI);
} else {
    // stream_launcher is not installed.
    NSLog(@"Could not find UTI for extension .%@", extension);
}
import Foundation
import CoreServices

let fileExtension = "aspkey"
if let exUTI = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, fileExtension as CFString, nil)?.takeRetainedValue() {
    if let appURLCF = LSCopyDefaultApplicationURLForContentType(exUTI, .all, nil)?.takeRetainedValue() {
        let appURL = appURLCF as URL
        let appPath = appURL.path
        // appPath indicates the path where stream_launcher is located.
    } else {
        // stream_launcher is not installed.
    }
} else {
    // stream_launcher is not installed.
}

Appendix 2: Obtain a UUID

When you launch stream_launcher, perform the following steps to obtain a UUID:

  • macOS: Write a UUID to a file named wuying_id and store the file in the following path: /Users/xxxx/Library/Application\ Support/wuying/wuying_id

  • Windows: Write a UUID to the HKEY_CURRENT_USER registry and store the registry in the following path: Software\\alibaba\\wuying\\UUID

Appendix 3: Delete the shortcut to the Alibaba Cloud Workspace client for Windows

After the plug-in of the Alibaba Cloud Workspace client for Windows is installed, a shortcut and start menu appear on the desktop of your local computer. If you do not want the shortcut and menu to appear, run the following script to delete them:

wuyingStartMenuPath = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Alibaba Cloud Workspace.lnk";
wuyingDesktopPath = "C:\Users\Public\Desktop\Alibaba Cloud Workspace.lnk";