Attaching Files to Secret Launchers on MacOS

Step 1: Creating a Custom Script for Your Application

Create a shell script, containing the full file path to your application, in the following format: 

#!/bin/bash\

open $1 -a "/Applications/PDF/[AppName].app

Example

Step 2: Creating a Custom Launcher

  1. Navigate to General Settings > Secret Templates > Launchers.

  2. Click Create.

  3. Enter the launcher information as shown below: 

    General Settings

    • Launcher Type: Batch file

    • Launcher Name: [Enter launcher name]

    • State: Enabled

    • Use additional prompt: No

    • Track multiple windows: Yes

    • Record additional processes: None

    • Wrap custom parameters with quotation marks: Yes

    Windows Settings

    • Batch file: None

    • Process arguments: None

    • Run process as secret credentials: No

    • Use Operating System Shell: No

    • Escape character: None

    • Characters to escape: None

    Mac Settings

    • Shell script: [Custom script from Step 1]

    • Process arguments: [Your file names]

      Paths to arguments must be in the following format: -file.[slug from secret template]
      Multiple files can be inserted as shown in the screenshot below:

       

    Step 3: Creating a Custom Template

 

  1. Create a new template inside Secret Server.

  2. Select the Fields tab and add a new field for each file you would like to launch. Make sure that the Data type is set to File.

  3. Select the Mapping tab and click Add mapping.

  4. Select the launcher you created in Step 1.

  5. Map the fields from the templates to the launcher.

  6. Launch the secret.