mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-03 01:17:56 +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 socket
|
||||||
import time
|
import time
|
||||||
import random
|
import random
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
import shlex
|
||||||
|
import stat
|
||||||
|
|
||||||
IPC_PORT = 39188
|
IPC_PORT = 39188
|
||||||
|
|
||||||
@ -87,15 +91,11 @@ class CommonService(object):
|
|||||||
self.rebootRequested = True
|
self.rebootRequested = True
|
||||||
|
|
||||||
def execute(self, cmdLine, section):
|
def execute(self, cmdLine, section):
|
||||||
import os
|
cmd = shlex.split(cmdLine)
|
||||||
import subprocess
|
|
||||||
import stat
|
|
||||||
|
|
||||||
cmd = cmdLine.split(' ')
|
if os.path.isfile(cmd[0]):
|
||||||
|
|
||||||
if os.path.isfile(cmd):
|
|
||||||
logger.info('File "{}" was found!!'.format(cmd))
|
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:
|
try:
|
||||||
# cmd = ["c:\\sysprep\\sysprep.exe", "/generalize", "/oobe", "/reboot", "/quiet", "/unattend:c:\\sysprep\\unattend.xml"]
|
# cmd = ["c:\\sysprep\\sysprep.exe", "/generalize", "/oobe", "/reboot", "/quiet", "/unattend:c:\\sysprep\\unattend.xml"]
|
||||||
res = subprocess.check_call(cmd)
|
res = subprocess.check_call(cmd)
|
||||||
|
Loading…
Reference in New Issue
Block a user