Community
Showing results for 
Search instead for 
Do you mean 
Reply

Identify Act! Edition

Accepted Solution Solved
Highlighted
Copper Contributor
Posts: 21
Country: United Kingdom
Accepted Solution

Identify Act! Edition

Could anyone advise if there is a property within the framework to identify which edition of Act! is running? (Premium, Pro etc)

 

Thanks.

Luke

 


Accepted Solutions
Solution
Accepted by topic author lukedev
‎11-23-2016 02:11 AM
Copper Super Contributor
Posts: 88
Country: USA

Re: Identify Act! Edition

Updated solution for 32 and 64-bit computers:

 

Dim iActVersion As String = ""
Dim ActType As String = ""
If iSystem = True Then ' 64-bit
iActVersion = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ACT\ACT7Updater\", "LastAppliedUpdateVersion", Nothing).ToString()
Else
iActVersion = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\ACT\ACT7Updater\", "LastAppliedUpdateVersion", Nothing).ToString()
End If
If iSystem = True Then
ActType = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ACT\Install\", "ProductID", Nothing).ToString()
Else
ActType = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\ACT\Install\", "ProductID", Nothing).ToString()
End If
iActVersion = ActType & " - " & iActVersion

View solution in original post


All Replies
Bronze Super Contributor
Posts: 1,224
Country: USA

Re: Identify Act! Edition

 

      Dim actversion As Integer = ACTVersion().Major
            If actversion > 18 Then
                ' DO something here
            End If

 

 

 

 

 Public ReadOnly Property ACTVersion() As Version
        Get
            Dim ParentAssembly As System.Reflection.Assembly = Nothing
            If System.Reflection.Assembly.GetEntryAssembly Is Nothing Then
                ParentAssembly = System.Reflection.Assembly.GetCallingAssembly
            Else
                ParentAssembly = System.Reflection.Assembly.GetEntryAssembly
            End If
            Return ParentAssembly.GetName().Version()
        End Get
    End Property

 

Here is the code I use in Impact Suite.

 

Hope this helps

-- Jim Durkin

 

Copper Contributor
Posts: 21
Country: United Kingdom

Re: Identify Act! Edition

Hi Jim,

 

Thanks for your reply. Perhaps I've misunderstood but won't that only give you the version number and not the edition?

I've been in touch with Act support who suggested getting the following registry key:-

 

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ACT\Install\Type

 

This returns "WORKGROUP" when Act is the premium edition.

 

Thanks again,

Luke

 

 

Copper Super Contributor
Posts: 88
Country: USA

Re: Identify Act! Edition

Here's what I use:

 

Dim ActVersion As String = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ACT\ACT7Updater\", "LastAppliedUpdateVersion", Nothing).ToString  
        Dim iLocate As Integer = InStr(ActVersion,".")
        ActVersion = Mid(ActVersion,1,iLocate - 1)
        Dim ActType As string = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ACT\Install\", "Type", Nothing).ToString
        lblActVersion.Text = "ACT! Version: " & ActVersion & " - " & ActType

Solution
Accepted by topic author lukedev
‎11-23-2016 02:11 AM
Copper Super Contributor
Posts: 88
Country: USA

Re: Identify Act! Edition

Updated solution for 32 and 64-bit computers:

 

Dim iActVersion As String = ""
Dim ActType As String = ""
If iSystem = True Then ' 64-bit
iActVersion = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ACT\ACT7Updater\", "LastAppliedUpdateVersion", Nothing).ToString()
Else
iActVersion = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\ACT\ACT7Updater\", "LastAppliedUpdateVersion", Nothing).ToString()
End If
If iSystem = True Then
ActType = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ACT\Install\", "ProductID", Nothing).ToString()
Else
ActType = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\ACT\Install\", "ProductID", Nothing).ToString()
End If
iActVersion = ActType & " - " & iActVersion