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
-
Navigate to General Settings > Secret Templates > Launchers.
-
Click Create.
-
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
-
-
Create a new template inside Secret Server.
-
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.
-
Select the Mapping tab and click Add mapping.
-
Select the launcher you created in Step 1.
-
Map the fields from the templates to the launcher.
-
Launch the secret.