mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-22 13:34:04 +03:00
adapted "run" windows registry key value, so it contains also arguments
This commit is contained in:
parent
e6b75e3807
commit
4de93ddf1f
@ -44,6 +44,10 @@ from .utils import exceptionToMessage
|
||||
import socket
|
||||
import time
|
||||
import random
|
||||
import os
|
||||
import subprocess
|
||||
import shlex
|
||||
import stat
|
||||
|
||||
IPC_PORT = 39188
|
||||
|
||||
@ -87,15 +91,11 @@ class CommonService(object):
|
||||
self.rebootRequested = True
|
||||
|
||||
def execute(self, cmdLine, section):
|
||||
import os
|
||||
import subprocess
|
||||
import stat
|
||||
cmd = shlex.split(cmdLine)
|
||||
|
||||
cmd = cmdLine.split(' ')
|
||||
|
||||
if os.path.isfile(cmd):
|
||||
if os.path.isfile(cmd[0]):
|
||||
logger.info('File "{}" was found!!'.format(cmd))
|
||||
if (os.stat(cmd).st_mode & stat.S_IXUSR) != 0:
|
||||
if (os.stat(cmd[0]).st_mode & stat.S_IXUSR) != 0:
|
||||
try:
|
||||
# cmd = ["c:\\sysprep\\sysprep.exe", "/generalize", "/oobe", "/reboot", "/quiet", "/unattend:c:\\sysprep\\unattend.xml"]
|
||||
res = subprocess.check_call(cmd)
|
||||
|
Loading…
Reference in New Issue
Block a user