I tried a lot of things but for some reason I could not get things working. I am trying to run dumpbin utility of MS VS using a Python script.
Here are what I tried (and what did not work for me)
1.
tempFile = open('C:\\Windows\\temp\\tempExports.txt', 'w')
command = '"C:/Program Files/Microsoft Visual Studio 8/VC/bin/dumpbin" /EXPORTS ' + dllFilePath
process = subprocess.Popen(command, stdout=tempFile)
process.wait()
tempFile.close()
2.
tempFile = open('C:\\Windows\\temp\\tempExports.txt', 'w')
command = 'C:/Program Files/Microsoft Visual Studio 8/VC/bin/dumpbin /EXPORTS ' + dllFilePath
process = subprocess.Popen(command, stdout=tempFile)
process.wait()
tempFile.close()
3.
tempFile = open('C:\\Windows\\temp\\tempExports.txt', 'w')
process = subprocess.Popen(['C:\\Program Files\\Microsoft Visual Studio 8\\VC\\bin\\dumpbin', '/EXPORTS', dllFilePath], stdout = tempFile)
process.wait()
tempFile.close()
does anyone have any idea on doing what i am trying to do (dumpbin /EXPORTS C:\Windows\system32\kernel32.dll > tempfile.txt
) correctly in Python?