Notifications
Clear all
[Closed] dot net -detect software version
Oct 13, 2011 8:03 pm
hi, I never worked on .net.
I want to know what version of Photoshop is installed on my system, also if there are more than 1 version installed then detect that too.
1 Reply
Oct 13, 2011 8:03 pm
why use dotnet? maxscript has a very nice registry struct.
fn getPhotoshopVersions =
(
local versions = #()
local swKey
registry.openKey HKEY_LOCAL_MACHINE "SOFTWARE" key:&swKey
local adobeKey
registry.openKey swKey "Adobe" key:&adobeKey
if adobeKey != undefined do
(
local psKey
registry.openKey adobeKey "Photoshop" key:&psKey
if psKey != undefined do
(
local names = #()
registry.getSubKeyNames psKey names:&names
versions = for n in names where n as float != undefined collect n as float
registry.closeKey psKey
)
registry.closeKey adobeKey
)
registry.closeKey swKey
versions
)
this works on my system configuration. I am not sure if this will work for all OS versions, or adobe product packages, etc.
edit: this might also return false positives for versions that were previously installed, but have been removed. Requires testing and I don’t feel like uninstalling photoshop