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.
在 Windows 上更新应用程序时,Install4j 有一个很棒的功能,即通知用户应用程序当前是否正在运行:“检测到正在运行的进程”屏幕。Mac 有类似的功能吗?
在安装程序中运行脚本以调用此 shell 脚本并根据结果为用户设置警告屏幕:-
#!/bin/bash PROCESS=YourApp.app number=$(ps aux | grep $PROCESS | wc -l) if [ $number -gt 1 ] then echo Running; else echo NotRunning; fi