当前位置:网站首页>Innosetup method for judging that the program has run
Innosetup method for judging that the program has run
2022-06-22 05:33:00 【Kingston】
You can use the WMI and the Win32_Process.
Try adding this function to your Inno Setup script.
function IsAppRunning(const FileName : string): Boolean;
var
FSWbemLocator: Variant;
FWMIService : Variant;
FWbemObjectSet: Variant;
begin
Result := false;
FSWbemLocator := CreateOleObject('WBEMScripting.SWBEMLocator');
FWMIService := FSWbemLocator.ConnectServer('', 'root\CIMV2', '', '');
FWbemObjectSet :=
FWMIService.ExecQuery(
Format('SELECT Name FROM Win32_Process Where Name="%s"', [FileName]));
Result := (FWbemObjectSet.Count > 0);
FWbemObjectSet := Unassigned;
FWMIService := Unassigned;
FSWbemLocator := Unassigned;
end;
边栏推荐
- Analysis of 43 cases of MATLAB neural network: Chapter 28 Application Research of decision tree classifier - breast cancer diagnosis
- 总有人问我:独立站该怎么玩?3个案例,你看完就懂了
- YARN 应用提交过程
- Record local project startup error: invalid source distribution: 8
- 2022深圳福田区专精特新小巨人企业申报条件,补贴50万
- DTS migration script MySQL
- 给仍在「 选品 」的跨境卖家提个醒!
- 毕业季 | 新的开始,不说再见
- Summary of knapsack problem
- 代码走查的优化方向(接口请求便捷、动态class判断条件过长、去除无用console、抽离公共方法)
猜你喜欢

2022 a special equipment related management (elevator) examination data and a special equipment related management (elevator) analysis

《MATLAB 神经网络43个案例分析》:第29章 极限学习机在回归拟合及分类问题中的应用研究——对比实验

搜狗输入法无法输出中文
Wanzi detailed data warehouse, data lake, data middle platform and lake warehouse are integrated

Contents of 2022 tea master (intermediate) examination and tea master (intermediate) examination
![[cloud native] 2.2 kubeadm create cluster](/img/b2/a57b7e44f74357d5aedbb9ddcd95ff.png)
[cloud native] 2.2 kubeadm create cluster

总有人问我:独立站该怎么玩?3个案例,你看完就懂了

大厂晋升学习方法四:Play 学习法

Topic selection system of college graduation design based on SSM

Storage mode and lifetime of C language variables
随机推荐
Talk about MySQL's locking rule "hard hitting MySQL series 15"
Opencv function usage details 1~10, including code examples
Force buckle 33 [search rotation sort array]
ActiveMQ knowledge summary of Message Oriented Middleware
Wanzi detailed data warehouse, data lake, data middle platform and lake warehouse are integrated
2022 welder (primary) new version test questions and welder (primary) free test questions
Graduation season | a new start, no goodbye
2022 Shanxi secondary vocational group "Cyberspace Security" event module b- web page penetration
在线文本代码对比工具
Zhiyuan OA vulnerability analysis, utilization and protection collection
Some templates about bisection
Performance analysis and test of interprocess communication methods under dual core real-time system
Force deletion of namespaces in terminating state
记本地项目启动报错:无效的源发行版: 8
Build JSP development environment in vs Code
Tidb performance overview panel
QEMU ARM interrupt system architecture 2
2022深圳福田区专精特新小巨人企业申报条件,补贴50万
Leetcode hot1-50
Tidb upgrade version