How to Store Recordings in a Cloud
The popularity of cloud solutions among our customers and their integration partners created the demand that upload options in the Technician Console should include some type of clouds or other data store hosts.
By default, the Technician Console (TC) offers four types of target destinations where customers can upload screen recordings:
- Remote folders referenced as \\machine\folder-path; drive:\folder-path
- FTP hosts
- HTTP hosts
- HTTPS hosts
- Use specific authentication defined by the customer, e.g. SSO login
- Run preliminary checks on the recordings
- Upload to multiple targets
- Analyze statistics
How does it work?
The Technician Console calls a script file that executes the upload, so the TC keeps control over the files, tells when and which file has to be uploaded. If the upload is successful, the file is deleted from its folder. The TC considers the upload successful when the file is gone from the folder. If the file remains in the folder after the execution of the script, the TC considers the upload failed, and retains the file for further upload attempts. The life-cycle of failed files is limited, just as in the case of the default targets (remote folder, FTP, HTTP ...).
Use Cases
Uploading recordings with the script provided by Rescue, rclone provided by the customer
- The customer sets the target folder in the Admin Center as "custom:CustomSRUploader.cmd".
- The customer downloads latest version of rclone.
- The customer copies rclone.exe command line tool to the same folder where LMIRTechConsole.exe is installed to e.g. C:\Program Files (x86)\LogMeIn Rescue Technician Console\LogMeInRescueTechnicianConsole_x64.
- The customer can pre-configure an rclone "remote" named "RescueSRUpload:".
Configuring "CustomSRUploader.cmd"
- The customer sets the target folder in the Admin Center as "custom:CustomSRUploader.cmd"
- The customer downloads the latest version of rclone, and saves it to a secure folder.
- The customer creates their own script.
- The customer sets the environment variables.
Variable Description RESCUE_SR_UPLOADER
the absolute path of the customer's script or binary RESCUE_SR_COMMAND_BEG
parameters on the script command line preceding the name of the upload file RESCUE_SR_COMMAND_END
parameters on the script command line after the name of upload file
If RESCUE_SR_UPLOADER is not defined, the script will set the parameters automatically as below:
SET "RESCUE_SR_UPLOADER=%SCRIPT_FOLDER%rclone.exe" SET RESCUE_SR_COMMAND_BEG=move SET RESCUE_SR_COMMAND_END=RescueSRUpload: -v -v -v
The customer has their own script, eg. "MyUploadScript.cmd"
Recommended when the customer has their own solutions, and no change is allowed in environment variables, or TC install folder. In this case default CustomSRUploader.cmd script is completely ignored.
- The customer sets the target folder in the Admin Center as custom:c:\MyScripts\MyUploadScript.cmd
- The TC calls the customer’s script every time a screen recording needs to be uploaded.
- The TC calls the script with one command line parameter, the absolute path of the file to be uploaded.
- The customer's script does the upload on its own. If the upload is successful the local file is deleted.
- The TC waits for the upload process to end, and after that it checks if the local file was deleted.
Result: If the file still exists, the upload failed, and reported at the TC console log. At the moment the return code of the customer's script is not used by the TC.
Creating and debugging a script
The Technician Console executes the script in a Windows command shell, but hidden, without UI. Since by default the programmer cannot see the standard output, or the errors of the script, the powerful features offered by the TC come to the rescue when debugging is needed.
Switching on UI for a Rescue terminal session
- Copy the GUID in parentheses onto the Clipboard - {f9d5d4ce-6dc7-44f2-875a-90426e75f4d6}.
- Start the Technician Console, that will check clipboard for the GUID at startup.
- While the TC runs, it will show command shell GUI for the script upload.
If the programmer/engineer logs in to a folder with editing permissions, the script will log into the screen recording local folder of the TC by default.
Eg: C:\Users\rescueuser\AppData\Local\Temp\LMIRescueScreenRecording_1746009\CustomSRUploader.log
The script receives the full path of the screen recording file, quoted by "...", as a command line parameter 1.
Script sample installed by the TC
SET SCRIPT_FOLDER=%~dp0
SET SCRIPT_LOGNAME=CustomSRUploader.log
SET SCREEN_RECORDING_FOLDER=%~dp1
SET SCREEN_RECORDING_NAME=%~n1
SET LOG_PATH="%SCREEN_RECORDING_FOLDER%%SCRIPT_LOGNAME%"
SET "LOG=ECHO >>%LOG_PATH% "
TITLE Upload: %SCREEN_RECORDING_NAME%
%LOG% [%DATE% %TIME%]: "-----------------------------------------------"
%LOG% [%DATE% %TIME%]: "Custom Script started"
%LOG% [%DATE% %TIME%]: "%RESCUE_SR_UPLOADER%" %RESCUE_SR_COMMAND_BEG% %1 %RESCUE_SR_COMMAND_END%
IF NOT DEFINED RESCUE_SR_UPLOADER (
SET "RESCUE_SR_UPLOADER=%SCRIPT_FOLDER%rclone.exe"
SET RESCUE_SR_COMMAND_BEG=move
SET RESCUE_SR_COMMAND_END=RescueSRUpload: -v -v -v
)