more on issue #742

This commit is contained in:
Bernardo Damele 2014-06-30 20:43:02 +01:00
parent 0c1b3f2dbc
commit 8ce98ae22c

View File

@ -179,7 +179,12 @@ class Filesystem(GenericFilesystem):
self.xpCmdshellWriteFile(psString, tmpPath, randPSScript) self.xpCmdshellWriteFile(psString, tmpPath, randPSScript)
logger.debug("executing the PowerShell script to write the %s file" % dFile) logger.debug("executing the PowerShell script to write the %s file" % dFile)
self.execCmd("powershell -ExecutionPolicy ByPass -File \"%s\"" % randPSScriptPath)
commands = ("powershell -ExecutionPolicy ByPass -File \"%s\"" % randPSScriptPath,
"del /F /Q \"%s\"" % (randPSScriptPath, randPSScriptPath))
complComm = " & ".join(command for command in commands)
self.execCmd(complComm)
def _stackedWriteFileDebugExe(self, tmpPath, wFile, wFileContent, dFile, fileType): def _stackedWriteFileDebugExe(self, tmpPath, wFile, wFileContent, dFile, fileType):
infoMsg = "using debug.exe to write the %s " % fileType infoMsg = "using debug.exe to write the %s " % fileType
@ -224,7 +229,7 @@ class Filesystem(GenericFilesystem):
debugMsg += "%s\%s to %s file %s\%s" % (tmpPath, chunkName, fileType, tmpPath, dFileName) debugMsg += "%s\%s to %s file %s\%s" % (tmpPath, chunkName, fileType, tmpPath, dFileName)
logger.debug(debugMsg) logger.debug(debugMsg)
commands = ("cd \"%s\"" % tmpPath, copyCmd, "del /F %s" % chunkName) commands = ("cd \"%s\"" % tmpPath, copyCmd, "del /F /Q %s" % chunkName)
complComm = " & ".join(command for command in commands) complComm = " & ".join(command for command in commands)
self.execCmd(complComm) self.execCmd(complComm)