turn off admin for linux pyOpenRPA

dev-linux
robo-bo 2 years ago
parent 2232240a58
commit 159b144107

@ -9,7 +9,7 @@ if lPyOpenRPASourceFolderPathStr != "": sys.path.insert(0,os.path.abspath(os.pat
from pyOpenRPA.Agent import __Agent__
from pyOpenRPA.Tools import CrossOS
if CrossOS.IS_WINDOWS_BOOL: lPortInt = 80
if CrossOS.IS_WINDOWS_BOOL: lPortInt = 1024
if CrossOS.IS_LINUX_BOOL: lPortInt = 1024
gUserNameUpperStr = getpass.getuser().upper()
if __name__ == "__main__": # New init way
@ -61,7 +61,7 @@ if __name__ == "__main__": # New init way
lL.setLevel(logging.INFO)
# create the logging file handler
mRobotLoggerFH = logging.FileHandler(
os.path.normpath("Logs\\" + gUserNameUpperStr + "_" + datetime.datetime.now().strftime("%Y_%m_%d") + ".log"))
CrossOS.PathStr("Logs\\" + gUserNameUpperStr + "_" + datetime.datetime.now().strftime("%Y_%m_%d") + ".log"))
mRobotLoggerFormatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')
mRobotLoggerFH.setFormatter(mRobotLoggerFormatter)
# add handler to logger object

@ -12,8 +12,8 @@ if lPyOpenRPASourceFolderPathStr != "": sys.path.insert(0,os.path.abspath(os.pat
from pyOpenRPA.Orchestrator import SettingsTemplate # Import functionallity
from pyOpenRPA.Tools import CrossOS
from pyOpenRPA import Orchestrator # Import orchestrator main
#Run as administrator
if not Orchestrator.OrchestratorIsAdmin():
#Run as administrator (ONLY FOR WINDOWS)
if not Orchestrator.OrchestratorIsAdmin() and CrossOS.IS_WINDOWS_BOOL:
Orchestrator.OrchestratorRerunAsAdmin()
print(f"Orchestrator will be run as administrator!")
else:

Loading…
Cancel
Save