Detect Visio versions

Trying to detect various Microsoft Visio versions. I’ve tried many different variations but nothing seems to be consistent. Any ideas.

  • What have you tried?
  • Can you provide links to related info?
  • What are the parts of the version info you want? 32bit/64bit? Standard vs Pro? 2013 vs …?
  • Can you provide examples of the output you want to get?
  • Windows or Mac?
  • Is the info you need in the uninstall key of the registry?
  • Where on the system is the info you need in general?

What have you tried?

if (exists regapp “visio.exe”) then ((pathname of it as string & " | " & version of it as string) of regapp “visio.exe”) else nothing

it whose(“VISIO.exe” = name of it) of it whose(name of it ends with “.exe”) of regapps

(if (x64 of operating system) then((values “DisplayName” of it) of keys whose (exists value “DisplayName” whose (it as string contains “Microsoft Visio” of it) of it) of key “HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall” of native registry) else (nothing));(if (not x64 of operating system) then ((values “DisplayName” of it) of keys whose (exists value “DisplayName” whose (it as string is “Microsoft Visio” of it) of it) of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of native registry) else (nothing))

if exists regapp “visio32.exe” whose (version of it = “6”) OR exists regapp “visio.exe” whose ((it = “10” OR it = “11” OR it = “12” OR it = “14” OR it = “15” OR it = “16”) of version of it) then ((if (exists regapp “visio32.exe” and version of regapp “visio32.exe” = “6”) then (“Visio 2000” & (if ((not exists file “vistk32.dll” of it AND not exists file “vispro32.dll” of it AND not exists file “visent32.dll” of it) of folder (pathname of parent folder of regapp “visio32.exe”)) then " Standard Edition" else (if (exists file “vispro32.dll” of folder (pathname of parent folder of regapp “visio32.exe”)) then (if (exists file “visent32.dll” of folder (pathname of parent folder of regapp “visio32.exe”)) then (if (exists file “vistk32.dll” of folder (pathname of parent folder of regapp “visio32.exe”)) then " Professional & Enterprise & Technical Edition" else " Professional & Enterprise Edition") else (if (exists file “vistk32.dll” of folder (pathname of parent folder of regapp “visio32.exe”)) then " Professional & Technical Edition" else " Professional Edition")) else (if (exists file “visent32.dll” of folder (pathname of parent folder of regapp “visio32.exe”)) then (if (exists file “vistk32.dll” of folder (pathname of parent folder of regapp “visio32.exe”)) then " Enterprise & Technical Edition" else " Enterprise Edition") else (if (exists file “vistk32.dll” of folder (pathname of parent folder of regapp “visio32.exe”)) then " Technical Edition" else “”)))) & " | " & (version of regapp “visio32.exe” as string)) else (nothings)) ; (if exists key whose ((exists value “DisplayVersion” whose (it as string as version = “10”) of it AND exists value “DisplayName” of it) AND (character 1 of it = “9” AND (it=“0” OR it =“1”) of character 2 of it AND (it = “51” OR it = “54”) of first 2 of following text of first 3 of it AND (preceding text of first “%7D” of it ends with “6D54-11D4-BEE3-00C04F990354”)) of name of it) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry then ((value “DisplayName” of it) as string & " | " & (value “DisplayVersion” of it) as string) of keys whose ((exists value “DisplayVersion” whose (it as string as version = “10”) of it AND exists value “DisplayName” of it) AND (character 1 of it = “9” AND (it=“0” OR it =“1”) of character 2 of it AND (it = “51” OR it = “54”) of first 2 of following text of first 3 of it AND (preceding text of first “%7D” of it ends with “6D54-11D4-BEE3-00C04F990354”)) of name of it) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry else nothings) ; (if exists key whose ((exists value “DisplayVersion” whose (it as string as version = “11”) of it AND exists value “DisplayName” of it) AND ((it >= “9”) of character 1 of it AND (it = “0” or it = “1”) of character 2 of it AND (it = “51” OR it = “53”) of first 2 of following text of first 3 of it AND (it ends with “6000-11D3-8CFE-0150048383C9”) of preceding text of first “}” of it) of name of it) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry then ((value “DisplayName” of it) as string & " | " & (value “DisplayVersion” of it) as string) of keys whose ((exists value “DisplayVersion” whose (it as string as version = “11”) of it AND exists value “DisplayName” of it) AND ((it >= “9”) of character 1 of it AND (it = “0” or it = “1”) of character 2 of it AND (it = “51” OR it = “53”) of first 2 of following text of first 3 of it AND (it ends with “6000-11D3-8CFE-0150048383C9”) of preceding text of first “}” of it) of name of it) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry else nothings) ; (if exists key whose (value “DisplayVersion” of it as string as version = “12” AND exists value “DisplayName” of it AND (((length of it = 38) AND (it contains “000000FF1CE%7D”) AND ((it = “0051” OR it = “0053”) of last 4 of (first 14 of it))) of (name of it))) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry then ((value “DisplayName” of it) as string & " | " & (value “DisplayVersion” of it) as string) of keys whose (value “DisplayVersion” of it as string as version = “12” AND exists value “DisplayName” of it AND (((length of it = 38) AND (it contains “000000FF1CE%7D”) AND ((it = “0051” OR it = “0053”) of last 4 of (first 14 of it))) of (name of it))) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry else nothings) ; (if exists keys whose (name of it = “Office14.VISIO” OR name of it = “Office14.VISIOR”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry then (((value “DisplayName” of it) as string & " | " & (value “DisplayVersion” of it) as string) of keys whose (name of it = “Office14.VISIO” OR name of it = “Office14.VISIOR”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry) else nothings)) else “N/A”

Can you provide links to related info?

just random info I’ve found on the forums

What are the parts of the version info you want? 32bit/64bit? Standard vs Pro? 2013 vs …?

looking for Standard /Professional

Can you provide examples of the output you want to get?
Microsoft Visio 20xx Standard/Professional
Windows or Mac? Windows

Is the info you need in the uninstall key of the registry? Yes but not sure how to properly filter without getting other unrelated stuff like Visio viewer

Where on the system is the info you need in general? Seemingly the uninstall key

Something along this line maybe?

Q: unique values of ((values "ParentDisplayName" of it as string) of (keys whose (exist value "ParentDisplayName" whose (it as string contains "Visio") of it) of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of it) of (registry ; native registry))
A: Microsoft Visio Standard 2013
1 Like