Commit bc562453 authored by Ivan Maslov's avatar Ivan Maslov

# RobotRDPActive - turn on shared drive for file transmition

parent afe13e94
......@@ -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)
......
......@@ -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
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment