-2

I have a simple python script that uses wmic, to gather information from remove machines. Everything worked well until I added a line to gather some version information about iexplorer (the os4 line).

os3 = os.popen('wmic /user:"' + username + '" /password:"' + pword + '" /node:"'+ name + '" os get Caption, CSDVersion /format:list').read()
os3 = os3.replace('\n','')
    
os4 = os.open('wmic /user:"' + username + '" /password:"' + pword + '" /node:"' + name + 'DATAFILE WHERE Name="%SYSTEMDRIVE%\\program files\\internet explorer\\iexplore.exe" os get Version /format:list').read()

The line requesting version information on iexplore.exe is returning this error:

TypeError: Required argument 'flags' (pos 2) not found

I don't see what the error is.

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
C0ppert0p
  • 634
  • 2
  • 7
  • 23

1 Answers1

0

The answer lies in my world class typing skills.

os4 = os.open( ...

should be

os4 = os.popen( ...
mkrieger1
  • 19,194
  • 5
  • 54
  • 65
C0ppert0p
  • 634
  • 2
  • 7
  • 23