> ## Documentation Index
> Fetch the complete documentation index at: https://help.gorelo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrar amb eines d'accés remot existents

> Integreu Splashtop, AnyDesk, TeamViewer, RustDesk i altres eines d'accés remot amb Gorelo configurant camps personalitzats d'actiu i dreceres de llançament d'URL.

Seguiu aquesta guia per integrar altres eines a Gorelo, com Splashtop, AnyDesk, TeamViewer, etc.

Podeu integrar Gorelo amb qualsevol eina d'accés remot que admeti el llançament via un URL, com Splashtop, AnyDesk o TeamViewer.

Aquest exemple utilitza:

* Splashtop Business
* RustDesk
* Webroot

<Tabs>
  <Tab title="Splashtop">
    <Steps>
      <Step title="Creeu el camp personalitzat d'actiu.">
        1. Aneu a **Configuració** > **Actius** > **[Camps personalitzats](https://app.gorelo.io/Admin/admin-settings#asset#assetcustomfields).**
        2. Afegiu un camp personalitzat amb els detalls següents:
           * **Nom**: `Splashtop SUUID`
           * **Variable**: `splashtopSUUID`

        <Frame>
          <img src="https://mintcdn.com/gorelo/VNk9kGyLTQMfiA_W/images/image-93.png?fit=max&auto=format&n=VNk9kGyLTQMfiA_W&q=85&s=fa3d59e87f10da576bb7b5435b89496c" alt="Image" width="784" height="606" data-path="images/image-93.png" />
        </Frame>
      </Step>

      <Step title="Escriviu l'script.">
        1. Aneu a **[Scripts](https://app.gorelo.io/Asset/script-list).**
        2. Creeu un script amb els detalls següents:
           * **Nom**: `Store-SplashtopSUUID`
           * **Contingut**:

        ```powershell theme={null}
        # Define registry path for 64-bit machines
        $regPath64 = "HKLM:\SOFTWARE\WOW6432Node\Splashtop Inc.\Splashtop Remote Server"

        # Define the value name for the SUUID
        $regValue = "SUUID"

        # Try to retrieve the SUUID from the 64-bit registry
        if (Test-Path $regPath64) {
            try {
                $suuid = Get-ItemProperty -Path $regPath64 -Name $regValue -ErrorAction Stop
                
                # Check if the SUUID value is present
                if ($suuid.$regValue) {
                    $suuidValue = $suuid.$regValue
                    Write-Output "Splashtop SUUID: $suuidValue"
                    
                    # Write the SUUID to the Gorelo custom field
                    GoreloAction -SetCustomField -Name 'asset.splashtopSUUID' -Value $suuidValue
                } else {
                    Write-Output "SUUID not found in the registry."
                }
            } catch {
                Write-Output "Error retrieving SUUID from the registry: $_"
            }
        } else {
            Write-Output "Splashtop registry not found."
        }
        ```
      </Step>

      <Step title="Desplegueu l'script via una política.">
        1. Aneu a **[Polítiques](https://app.gorelo.io/Asset/policy-management).**
        2. Editeu una política existent que cobreixi els actius per als quals voleu emmagatzemar el Splashtop SUUID.
        3. Afegiu l'script `Store-SplashtopSUUID` i configureu-lo perquè es repeteixi diàriament a l'hora preferida.
        4. **Deseu** i **distribuïu** la política.
      </Step>

      <Step title="Creeu la drecera.">
        1. Aneu a **[Dreceres d'actiu](https://app.gorelo.io/Admin/admin-settings#asset#assetshortcuts).**
        2. Afegiu una nova drecera amb els detalls següents:
           * **Nom**: `Splashtop`
           * **URL**: `t-business://com.splashtop.business?account=&uuid={{$gorelo:asset.splashtopSUUID}}&sessiontype=remote`
           * **Nom fixat**:  `Splashtop`
                     <Frame>
                       <img src="https://mintcdn.com/gorelo/VNk9kGyLTQMfiA_W/images/image-94.png?fit=max&auto=format&n=VNk9kGyLTQMfiA_W&q=85&s=6f6a457fb40ae89f476e82e9493affdb" alt="Image 94" width="776" height="756" data-path="images/image-94.png" />
                     </Frame>
             Ara hauríeu de veure la drecera **SPLASHTOP** a l'extrem superior dret de la pàgina de detall de l'actiu. Si l'script ha emplenat correctament la variable `$gorelo:asset.splashtopSUUID`, aquesta drecera llançarà l'aplicació Splashtop Business.
                     <Frame>
                       <img src="https://mintcdn.com/gorelo/VNk9kGyLTQMfiA_W/images/image-95.png?fit=max&auto=format&n=VNk9kGyLTQMfiA_W&q=85&s=c904bd21d026b986eb127ecb9c8d72d0" alt="Image" width="310" height="211" data-path="images/image-95.png" />
                     </Frame>
      </Step>
    </Steps>

    La drecera no instal·la Splashtop: caldria utilitzar un altre script per a això, per exemple:

    ```powershell theme={null}
    # Installs Splashtop Streamer using the installer MSI uploaded to $gorelo:file.splashtopInstaller
    # Runs a silent install using the 12-digit deployment key at $gorelo:client.splashtopKey

    #Check for presence of SplashtopKey
    if ([string]::IsNullOrEmpty($gorelo:client.splashtopKey)) {
    Write-Output "No SplashTop Key stored for this client. Automatic installation cancelled."
    GoreloAction -Alert -Severity 3 -Name "No Splashtop Key stored for this client" -Description "No Splashtop Key is stored in the client custom field so the automatic installation has been cancelled" -Suppress 0
    } else {
    Write-Output "Splashtop Key Found: " $gorelo:client.splashtopKey
    Write-Output "Installer Path: " $gorelo:file.splashtopInstaller
    }

    #Install Splashtop
    msiexec /i $gorelo:file.splashtopInstaller USERINFO="dcode=$gorelo:client.splashtopKey,hidewindow=1,confirm_d=0" /qn /norestart
    ```
  </Tab>

  <Tab title="RustDesk">
    Es recomana fermament allotjar el vostre propi servidor RustDesk i modificar l'script d'instal·lació inicial per donar-hi suport.

    <Steps>
      <Step title="Creeu el camp personalitzat d'actiu.">
        1. Aneu a **Configuració** > **Actius** > **[Camps personalitzats](https://app.gorelo.io/Admin/admin-settings#asset#assetcustomfields).**
        2. Afegiu un camp personalitzat amb els detalls següents:
           * **Nom**: RustDesk ID
           * **Variable**: rustdeskID
                     <Frame>
                       <img src="https://mintcdn.com/gorelo/U5LP8ONeOiG8YFD5/images/image-99.png?fit=max&auto=format&n=U5LP8ONeOiG8YFD5&q=85&s=269f2deb3032c4d2820a8a5c961a4e1a" alt="Image" width="803" height="622" data-path="images/image-99.png" />
                     </Frame>
        3. Afegiu un camp personalitzat amb els detalls següents:
           * **Nom**: RustDesk Password
           * **Variable**: rustdeskPassword
                     <Frame>
                       <img src="https://mintcdn.com/gorelo/lqwr7vR8TnJnU6L2/images/image-100.png?fit=max&auto=format&n=lqwr7vR8TnJnU6L2&q=85&s=bbc282d1359062edafaed06e986119bd" alt="Image" width="802" height="618" data-path="images/image-100.png" />
                     </Frame>
      </Step>

      <Step title="Pugeu el fitxer d'instal·lació.">
        1. Aneu a **Configuració** > Actiu > [**<u>Fitxers</u>**](https://app.gorelo.io/Admin/admin-settings#asset#filerepository).
        2. Afegiu un fitxer amb els detalls següents:
           * **Fitxer**: Pugeu l'últim instal·lador MSI de RustDesk.
           * **Variable**: rustdesk
      </Step>

      <Step title="Escriviu l'script.">
        1. Aneu a [**Scripts**](https://app.gorelo.io/Asset/script-list).
        2. Creeu un script amb els detalls següents:
           * **Nom**: Install Rustdesk
           * **Contingut**:

        ```powershell theme={null}
           #Install Rusdesk
           msiexec /i $gorelo:file.rustdesk /qn /norestart CREATESTARTMENUSHORTCUTS="N" CREATEDESKTOPSHORTCUTS="N" /l*v install.log

        ```

        3. Creeu un script amb els detalls següents:
           * Nom: Write Rustdesk ID and Password
           * Contingut:

        ```powershell theme={null}
           $RustDeskPath = "$env:ProgramFiles\RustDesk\RustDesk.exe"
           
           # Get Rustdesk ID using the executable
           $RustdeskID = cmd /c "`"$RustDeskPath`" --get-id"
           
           if ($RustdeskID) {
              # Write ID to Gorelo custom field
              GoreloAction -SetCustomField -Name 'asset.rustdeskID' -Value $RustdeskID
              Write-Output "Rustdesk ID: $RustdeskID written to Gorelo"
           
              # Generate random 16 character password
              $Password = -join ((65..90) + (97..122) + (48..57) | Get-Random -Count 16 | ForEach-Object {[char]$_})
              
              # Set the password in Rustdesk
              cmd /c "`"$RustDeskPath`" --password $Password"
              
              # Write password to Gorelo custom field
              GoreloAction -SetCustomField -Name 'asset.rustdeskPassword' -Value $Password
              Write-Output "Rustdesk password set and saved to Gorelo"
              exit 0
           } else {
              Write-Output "Failed to get Rustdesk ID"
              exit 1
           }
        ```
      </Step>

      <Step title="Desplegueu els scripts via una política.">
        1. Aneu a **[Polítiques](https://app.gorelo.io/Asset/policy-management).**
        2. Editeu una política existent que cobreixi els actius que voleu instal·lar i connectar via RustDesk.
        3. Afegiu una comprovació contínua de servei per a **RustDesk Service**. Afegiu l'script 'Install Rustdesk' com a pas de remediació.
        4. Afegiu l'script 'Write Rustdesk ID and Password' i configureu-lo perquè es repeteixi diàriament a l'hora preferida.
        5. **Deseu** i **distribuïu** la política.
      </Step>

      <Step title="Creeu la drecera.">
        1. Aneu a **[Dreceres d'actiu](https://app.gorelo.io/Admin/admin-settings#asset#assetshortcuts).**
        2. Afegiu una nova drecera amb els detalls següents:
           * **Nom**: `RustDesk`
           * **URL**:`rustdesk://{{\$gorelo:asset.rustdeskID}}?password={{\$gorelo:asset.rustdeskPassword}}`
           * **Nom fixat**: `RustDesk`

        <Frame>
          <img src="https://mintcdn.com/gorelo/lqwr7vR8TnJnU6L2/images/image-101.png?fit=max&auto=format&n=lqwr7vR8TnJnU6L2&q=85&s=9be09dfa8c0571ab242e690fe0b81d75" alt="Image" width="776" height="756" data-path="images/image-101.png" />

          Ara hauríeu de veure la drecera **RustDesk** a l'extrem superior dret de la pàgina de detall de l'actiu. Si l'script ha emplenat correctament els camps personalitzats, aquesta drecera llançarà l'aplicació RustDesk.
        </Frame>

        L'URL de Bitdefender per a l'exe d'instal·lació hauria de ser semblant a aquest (exemple fals):

        [https://cloudgz.gravityzone.bitdefender.com/Packages/BSTWIN/0/setupdownloader\_\[aHR0cHM6Ly9jbG91ZGdLWDawWVjcy5ncR5em9uZS5iaXRkZWZl3ddwawGfawdmRlci5jb20vUGFja2FnZXMvQlNUV0lOLzAvdkluc3RhbGxlci54bw-bGFuZz1lbi1VUw==\].exe](https://cloudgz.gravityzone.bitdefender.com/Packages/BSTWIN/0/setupdownloader_\[aHR0cHM6Ly9jbG91ZGdLWDawWVjcy5ncR5em9uZS5iaXRkZWZl3ddwawGfawdmRlci5jb20vUGFja2FnZXMvQlNUV0lOLzAvdkluc3RhbGxlci54bw-bGFuZz1lbi1VUw==].exe)
      </Step>
    </Steps>
  </Tab>
</Tabs>
