0

Possible Duplicate:
Add/remove programs in Windows XP with Python script

I am a newbie in python and basically do windows sysadmin tasks and sometimes write batch script. However i am trying to learn python by implementing the scripts in windows tasks. The actual task i want to do is a follows: To remove acrobat reader or acrobat standard version and install acrobat professional. I also have to remove SAP client application from the machine and be able to run another SAP install.cmd file which then installs an updated version of SAP.could your or someone post me a more or less complete working script?

Thanks in advance – Everest

Community
  • 1
  • 1
Everest
  • 39
  • 2
  • 3
  • I won't post a working script, but isnt the install/uninstall task just a matter of executing (de)installers? If so, have a look at http://docs.python.org/library/os.html#os.system – phimuemue Aug 31 '10 at 09:25
  • -1 for asking the same question twice! --> http://stackoverflow.com/questions/3599213/add-remove-programs-in-windows-xp-with-python-script – volting Aug 31 '10 at 10:32

1 Answers1

0

To call a function as if you had entered it on the command line, use subprocess.Popen. There are various scripting functions (copy, remove) in the os and shutil modules.

Katriel
  • 120,462
  • 19
  • 136
  • 170