$file = FileOpen(@ScriptDir&"\RegInstalledItems.csv",1)
if $file = -1 Then
	ConsoleWrite("ERROR: Unable to write to the output file")
	Exit
EndIf

$i = 1
While not @error
	$var = RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", $i)
	If @error <> 0 then ExitLoop
	;MsgBox(4096, "SubKey #" & $i & " under HKLM\Software: ", $var)
	$var2 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"&$var,"DisplayName")
	;MsgBox(0,"Val",$var2)
	$outLine = $var&","&$var2
	FileWriteLine($file,$outLine)
	$i += 1
WEnd
FileClose($file)

  

在使用autoIt的过程中,无论是自动化测试,还是界面开发,经常性的会需要获取已安装程序列表,从而判断某程序是否已经安装。

下面提供一个可以运行的代码段(Google获取的)

 

相关文章:

  • 2021-07-04
  • 2021-10-18
  • 2021-09-23
  • 2022-01-26
  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
  • 2021-09-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-22
相关资源
相似解决方案