Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我单击 excel 中的按钮时,它应该启动或停止特定的系统服务。我怎样才能做到这一点?
尝试使用 Shell 和 sc.exe 的组合,例如:
Shell "sc.exe \\yourserver start servicename".
服务键是 W3SVC 之类的服务名称。将 start 替换为 stop 以停止它。