diff --git a/Sources/pyOpenRPA/Tools/RobotRDPActive/Connector.py b/Sources/pyOpenRPA/Tools/RobotRDPActive/Connector.py index 45abf837..72e37915 100644 --- a/Sources/pyOpenRPA/Tools/RobotRDPActive/Connector.py +++ b/Sources/pyOpenRPA/Tools/RobotRDPActive/Connector.py @@ -61,12 +61,17 @@ def SessionConfigurationCreate(inConfiguration): if 'Port' in inConfiguration: if inConfiguration['Port']: lHostPort=f"{lHostPort}:{inConfiguration['Port']}" + # Generate parameter for .rdp "drivestoredirect:s:C:\;" + lDriveStoreDirectStr = "" + for lItem in inConfiguration['SharedDriveList']: + lDriveStoreDirectStr+=f"{lItem.upper()}:\\;" # Attention - all drives must be only in upper case!!! #Replace {Width}, {Height}, {BitDepth}, {HostPort}, {Login} lRDPTemplateFileContent = lRDPTemplateFileContent.replace("{Width}", str(inConfiguration.get('Screen',{}).get("Width",1680))) lRDPTemplateFileContent = lRDPTemplateFileContent.replace("{Height}", str(inConfiguration.get('Screen',{}).get("Height",1050))) lRDPTemplateFileContent = lRDPTemplateFileContent.replace("{BitDepth}", inConfiguration.get('Screen',{}).get("DepthBit","32")) lRDPTemplateFileContent = lRDPTemplateFileContent.replace("{HostPort}", lHostPort) lRDPTemplateFileContent = lRDPTemplateFileContent.replace("{Login}", inConfiguration['Login']) + lRDPTemplateFileContent = lRDPTemplateFileContent.replace("{SharedDriveList}", lDriveStoreDirectStr) #Save template to temp file lRDPCurrentFileFullPath = os.path.join(tempfile.gettempdir(), f"{uuid.uuid4().hex}.rdp") open(lRDPCurrentFileFullPath, "w", encoding="utf-16-le").write(lRDPTemplateFileContent) diff --git a/Sources/pyOpenRPA/Tools/RobotRDPActive/Template.rdp b/Sources/pyOpenRPA/Tools/RobotRDPActive/Template.rdp index 10193862..aeeb6d1b 100644 Binary files a/Sources/pyOpenRPA/Tools/RobotRDPActive/Template.rdp and b/Sources/pyOpenRPA/Tools/RobotRDPActive/Template.rdp differ diff --git a/Utils/RobotRDPActive/SettingsRobotRDPActiveExample.py b/Utils/RobotRDPActive/SettingsRobotRDPActiveExample.py index 3df138e7..94c7e5be 100644 --- a/Utils/RobotRDPActive/SettingsRobotRDPActiveExample.py +++ b/Utils/RobotRDPActive/SettingsRobotRDPActiveExample.py @@ -11,7 +11,7 @@ lOrchestratorProtocol="http" lOrchestratorAuthToken="1992-04-03-0643-ru-b4ff-openrpa52zzz" lRobotRDPActiveFolderPath = '\\'.join(RobotRDPActive.__file__.split('\\')[:-1]) -print(f"{os.path.join(lRobotRDPActiveFolderPath,'SessionDefs.py')}") +#print(f"{os.path.join(lRobotRDPActiveFolderPath,'SessionDefs.py')}") def Settings(): mDict = { "RDPList": @@ -28,6 +28,7 @@ def Settings(): "FlagUseAllMonitors": False, # True or False "DepthBit": "32" # "32" or "24" or "16" or "15" }, + "SharedDriveList":["c"], # List of the Root sesion hard drives "SessionHex":"", # Hex is created when robot runs "FlagSessionIsActive": False }