FireDaemon Pro allows you to run your program directly off a mapped network drive, via UNC path or symlink. Additionally, you can configure FireDaemon Pro to map network drives and make them available to your program.
You can run a program or script as a service under FireDaemon Pro even if that executable resides on a network drive. In order to run a program off of a network drive, the following must occur:
- The program or script must be placed in a folder that is shared out
- The program or script can be referenced via mapped drive (e.g. L:\path\program.exe) or via Universal/Uniform Naming Convention (UNC) path (e.g. \\server\share\path\program.exe)
- Mapped drives or UNC paths can only be used if the service is run as a specific local or domain user
- If you intend to run the service as a local or domain user then that user must have permission to access the network resource. If you want your application to Interact With The Desktop then you need to ensure that the local or domain user is in the local or domain Administrators group
- If you want to use a mapped drive then you must set up a "Before Program Launch Event" in your FireDaemon Pro service configuration to map the drive
- The program working directory can be either a mapped drive or UNC path. If a UNC path is used, a trailing slash (\) must be appended to the path (.eg. \\server\share\path\)
Running A Program under FireDaemon Pro from a Mapped Drive
Set up the service under FireDaemon Pro as follows. Note that the drive letter for the Executable and Working Directory is included in the path per the screenshot below:
Next, set the service logon credentials via the Settings tab. The user account you choose must be able to map the network drive.
Next, set up the SMB drive mapping via the Events tab per the screenshot below. Change the Parameters field in the Launch Event to reflect the name of the host you are connecting to and the name of the share on that host.
Running A Program under FireDaemon Pro via UNC Path
You can run a program under FireDaemon Pro via a UNC path. There's no need to procedure an explicit drive mapping so the setup is a little simpler. To do this set up the program you wish to run under FireDaemon Pro control. In this case, include the UNC path to program or script per the screenshot below. Clearly, adjust the hostname and share accordingly for your environment.
Next, set the service logon credentials via the Settings tab. The user account you choose must be able to access the UNC path. The user account can be local or domain-based. For more information regarding user accounts see the FireDaemon Pro New / Edit Service - Settings Tab in the User Guide.
Running A Program under FireDaemon Pro via symlink
Using the techniques above, you can also try mapping network drives using symlinks. This then avoids the need to explicitly map drives or use UNC paths in your FireDaemon Pro configuration. To do that, log in as the user that has permission to map a drive, then at an elevated command prompt:
mklink /d C:\Link \\hostname\share
You can now access the application you want to run or working directory as though it's a local drive via FireDaemon Pro.