使用python脚本在Windows中卸载和安装程序

发布于 2024-09-16 15:09:06 字数 494 浏览 4 评论 0原文

可能的重复:
使用 Python 脚本在 Windows XP 中添加/删除程序

我是 python 的新手,基本上执行 Windows 系统管理任务,有时编写批处理脚本。不过,我正在尝试通过在 Windows 任务中实现脚本来学习 python。我想要做的实际任务如下:删除 acrobat reader 或 acrobat standard 版本并安装 acrobat professional。我还必须从计算机中删除 SAP 客户端应用程序,并能够运行另一个 SAP install.cmd 文件,然后安装 SAP 的更新版本。您或某人可以向我发布一个或多或少完整的工作脚本吗?

提前致谢 - 珠穆朗玛峰

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

药祭#氼 2024-09-23 15:09:06

要像在命令行中输入函数一样调用函数,请使用 subprocess.Popenosshutil 模块中有各种脚本函数(复制、删除)。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文