• Access 2016 Get Windows Build

    From =?utf-8?Q?J=C3=BCrgen_Meyer?=@juergen.ul.meyer@gmx.de to comp.databases.ms-access on Sun Jun 14 13:37:45 2020
    From Newsgroup: comp.databases.ms-sqlserv

    The following shows me the build number

    Function Test()
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colOperatingSystems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
    For Each objOperatingSystem In colOperatingSystems
    Debug.Print objOperatingSystem.Caption & " " & objOperatingSystem.Version & " " & objOperatingSystem.Build Number
    Next
    End Function

    It shows me:
    19041
    But the info is not complete
    I want to get the complete build number
    In this case:
    19041.329

    Any idea?

    Rgds
    Juergen
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From =?UTF-8?Q?Ulrich_M=c3=b6ller?=@knobbi38@arcor.de to comp.databases.ms-access on Sun Jun 14 21:51:00 2020
    From Newsgroup: comp.databases.ms-sqlserv

    Has the topic been discussed in https://groups.google.com/d/msg/microsoft.public.de.access/_gH9df68QMU/8hjruDxWAQAJ,
    or is there still some feedback?


    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From =?utf-8?Q?J=C3=BCrgen_Meyer?=@juergen.ul.meyer@gmx.de to comp.databases.ms-access on Sun Jun 14 22:16:37 2020
    From Newsgroup: comp.databases.ms-sqlserv

    On Sun, 14 Jun 2020 21:51:00 +0200, "Ulrich M||ller" posted:

    Has the topic been discussed in >https://groups.google.com/d/msg/microsoft.public.de.access/_gH9df68QMU/8hjruDxWAQAJ,
    or is there still some feedback?

    I have asked the same question again here because this is an international group.
    I here hope to find more and simpler solutions than in the German newsgroup. Let us wait and see.

    The main question is whether there is a simple command to get the desired complete information.

    Juergen
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Ron Paii@ron81pai@gmail.com to comp.databases.ms-access on Mon Jun 15 06:00:05 2020
    From Newsgroup: comp.databases.ms-sqlserv

    On Sunday, June 14, 2020 at 6:37:52 AM UTC-5, J|+rgen Meyer wrote:
    The following shows me the build number

    Function Test()
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colOperatingSystems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
    For Each objOperatingSystem In colOperatingSystems
    Debug.Print objOperatingSystem.Caption & " " & objOperatingSystem.Version
    & " " & objOperatingSystem.Build Number
    Next
    End Function

    It shows me:
    19041
    But the info is not complete
    I want to get the complete build number
    In this case:
    19041.329

    Any idea?

    Rgds
    Juergen
    I Googled "Get access built number". The 2nd hit pointed to "https://www.devhut.net/2014/04/30/determine-access-version-build-number-and-service-pack-level/" that had a function returning the build and service pack. It worked correctly for Access 2016.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From =?UTF-8?Q?Ulrich_M=c3=b6ller?=@knobbi38@arcor.de to comp.databases.ms-access on Mon Jun 15 21:51:03 2020
    From Newsgroup: comp.databases.ms-sqlserv

    Hi J|+rgen,

    Am 14.06.2020 um 22:16 schrieb J|+rgen Meyer:
    Has the topic been discussed in
    https://groups.google.com/d/msg/microsoft.public.de.access/_gH9df68QMU/8hjruDxWAQAJ,
    or is there still some feedback?

    I have asked the same question again here because this is an international group.
    I here hope to find more and simpler solutions than in the German newsgroup. Let us wait and see.

    The main question is whether there is a simple command to get the desired complete information.
    there is no simple single command that provides this information. Did
    you see the hint with the PS script which provides this information by
    simply reading 4 registry keys? It won't get any easier than that.

    Ulrich

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From =?UTF-8?Q?Ulrich_M=c3=b6ller?=@knobbi38@arcor.de to comp.databases.ms-access on Mon Jun 15 21:56:32 2020
    From Newsgroup: comp.databases.ms-sqlserv

    Ho Ron,

    Am 15.06.2020 um 15:00 schrieb Ron Paii:
    I Googled "Get access built number". The 2nd hit pointed to"https://www.devhut.net/2014/04/30/determine-access-version-build-number-and-service-pack-level/" that had a function returning the build and service pack. It worked correctly for Access 2016.
    i think the OP is looking for a way to read the windows build number,
    not the version of Access itself.

    Ulrich

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Ron Paii@ron81pai@gmail.com to comp.databases.ms-access on Tue Jun 16 04:57:42 2020
    From Newsgroup: comp.databases.ms-sqlserv

    On Monday, June 15, 2020 at 2:56:37 PM UTC-5, Ulrich M||ller wrote:
    Ho Ron,

    Am 15.06.2020 um 15:00 schrieb Ron Paii:
    I Googled "Get access built number". The 2nd hit pointed to"https://www.devhut.net/2014/04/30/determine-access-version-build-number-and-service-pack-level/" that had a function returning the build and service pack. It worked correctly for Access 2016.
    i think the OP is looking for a way to read the windows build number,
    not the version of Access itself.

    Ulrich
    That is what the function returns, see "12827.20268" part of the return value. ?GetVerInfo("msaccess.exe")
    16.0.12827.20268
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Ron Weiner@rw@domain.com to comp.databases.ms-access on Tue Jun 16 10:21:09 2020
    From Newsgroup: comp.databases.ms-sqlserv

    Jnrgen Meyer brought next idea :
    The following shows me the build number

    Function Test()
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colOperatingSystems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
    For Each objOperatingSystem In colOperatingSystems
    Debug.Print objOperatingSystem.Caption & " " & objOperatingSystem.Version & " " & objOperatingSystem.Build Number
    Next
    End Function

    It shows me:
    19041
    But the info is not complete
    I want to get the complete build number
    In this case:
    19041.329

    Any idea?

    Rgds
    Juergen

    I guess you could always shell to a command prompt and run a VER
    command. I'v not tryed thisd from Access but from the command prompt I
    get:
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    C:\Users\rweiner>ver

    Microsoft Windows [Version 10.0.18362.900]

    C:\Users\rweiner>
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

    Seels to me that you could pipe the output to a text file, open the
    text file, and parse the contents and "Bob's uour uncle".

    Ron W
    --
    This email has been checked for viruses by AVG.
    https://www.avg.com

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From =?utf-8?Q?J=C3=BCrgen_Meyer?=@juergen.ul.meyer@gmx.de to comp.databases.ms-access on Wed Jun 17 11:39:21 2020
    From Newsgroup: comp.databases.ms-sqlserv

    On Tue, 16 Jun 2020 04:57:42 -0700 (PDT), "Ron Paii" posted:

    On Monday, June 15, 2020 at 2:56:37 PM UTC-5, Ulrich M||ller wrote:
    Ho Ron,

    Am 15.06.2020 um 15:00 schrieb Ron Paii:
    I Googled "Get access built number". The 2nd hit pointed to"https://www.devhut.net/2014/04/30/determine-access-version-build-number-and-service-pack-level/" that had a function returning the build and service pack. It worked correctly for Access 2016.
    i think the OP is looking for a way to read the windows build number,
    not the version of Access itself.

    Ulrich

    That is what the function returns, see "12827.20268" part of the return value.

    ?GetVerInfo("msaccess.exe")
    16.0.12827.20268

    Hi Ron,
    I asked for the Windows version, not for the Access-Version.
    The solution in the link is much too complicated and not compatible with
    future versions

    Here is the easy way in VBA to get the Access version:
    MsgBox "You are currently running Microsoft Access, " _
    & " version " & Application.Version & ", build " _
    & Application.Build & "."

    Juergen
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Ron Weiner@rw@domain.com to comp.databases.ms-access on Fri Jun 19 13:29:19 2020
    From Newsgroup: comp.databases.ms-sqlserv

    Ron Weiner presented the following explanation :
    Jnrgen Meyer brought next idea :
    The following shows me the build number

    Function Test()
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" &
    "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colOperatingSystems = objWMIService.ExecQuery("Select * from
    Win32_OperatingSystem")
    For Each objOperatingSystem In colOperatingSystems
    Debug.Print objOperatingSystem.Caption & " " &
    objOperatingSystem.Version & " " & objOperatingSystem.Build Number
    Next
    End Function

    It shows me: 19041
    But the info is not complete
    I want to get the complete build number
    In this case:
    19041.329

    Any idea?

    Rgds
    Juergen

    I guess you could always shell to a command prompt and run a VER command. I'v not tryed thisd from Access but from the command prompt I get: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    C:\Users\rweiner>ver

    Microsoft Windows [Version 10.0.18362.900]

    C:\Users\rweiner>
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

    Seels to me that you could pipe the output to a text file, open the text file, and parse the contents and "Bob's uour uncle".

    Ron W

    Kinda weird replying to my own post, but today I decided ti test my
    Shell to a command prompt theory. Here is some bare bones code that
    seems to work here in my environment. I have all of this in a standard
    Access Code Module.

    Private Declare Sub Sleep Lib "kernel32" (ByVal dwMillseconds As Long)

    Public Function WinVer() As String
    ' Get Windows version with the complete build number
    Dim strCurDir As String, strCmdLine As String
    Dim strVerResult As String
    Dim lngFilenum As Long

    strCurDir = CurDir() & "\"
    Call Shell("cmd /k ver > rdub.txt ", vbHide)
    Call Sleep(250)
    lngFilenum = FreeFile()
    Open strCurDir & "rdub.txt" For Input As #lngFilenum
    strVerResult = Input$(LOF(lngFilenum), lngFilenum)
    Close lngFilenum
    Kill strCurDir & "rdub.txt"
    WinVer = strVerResult
    End Function

    In a production app there'd have to be error checking, and I'd take a
    decidely more defensive style around the File location, but as a proof
    of concept, I have to say this is a workable method.

    Rdub
    --
    This email has been checked for viruses by AVG.
    https://www.avg.com

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Ron Paii@ron81pai@gmail.com to comp.databases.ms-access on Fri Jun 19 10:42:03 2020
    From Newsgroup: comp.databases.ms-sqlserv

    On Friday, June 19, 2020 at 12:29:25 PM UTC-5, Ron Weiner wrote:
    Ron Weiner presented the following explanation :
    J|+rgen Meyer brought next idea :
    The following shows me the build number

    Function Test()
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" &
    "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colOperatingSystems = objWMIService.ExecQuery("Select * from
    Win32_OperatingSystem")
    For Each objOperatingSystem In colOperatingSystems
    Debug.Print objOperatingSystem.Caption & " " &
    objOperatingSystem.Version & " " & objOperatingSystem.Build Number
    Next
    End Function

    It shows me: 19041
    But the info is not complete
    I want to get the complete build number
    In this case:
    19041.329

    Any idea?

    Rgds
    Juergen

    I guess you could always shell to a command prompt and run a VER command. I'v not tryed thisd from Access but from the command prompt I get: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    C:\Users\rweiner>ver

    Microsoft Windows [Version 10.0.18362.900]

    C:\Users\rweiner>
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

    Seels to me that you could pipe the output to a text file, open the text file, and parse the contents and "Bob's uour uncle".

    Ron W

    Kinda weird replying to my own post, but today I decided ti test my
    Shell to a command prompt theory. Here is some bare bones code that
    seems to work here in my environment. I have all of this in a standard Access Code Module.

    Private Declare Sub Sleep Lib "kernel32" (ByVal dwMillseconds As Long)

    Public Function WinVer() As String
    ' Get Windows version with the complete build number
    Dim strCurDir As String, strCmdLine As String
    Dim strVerResult As String
    Dim lngFilenum As Long

    strCurDir = CurDir() & "\"
    Call Shell("cmd /k ver > rdub.txt ", vbHide)
    Call Sleep(250)
    lngFilenum = FreeFile()
    Open strCurDir & "rdub.txt" For Input As #lngFilenum
    strVerResult = Input$(LOF(lngFilenum), lngFilenum)
    Close lngFilenum
    Kill strCurDir & "rdub.txt"
    WinVer = strVerResult
    End Function

    In a production app there'd have to be error checking, and I'd take a decidely more defensive style around the File location, but as a proof
    of concept, I have to say this is a workable method.

    Rdub

    --
    This email has been checked for viruses by AVG.
    https://www.avg.com
    Not weird; I wish more would post back solutions they found.
    PS: Sorry about misunderstanding the version of what you were looking for.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From =?utf-8?Q?J=C3=BCrgen_Meyer?=@juergen.ul.meyer@gmx.de to comp.databases.ms-access on Sat Jun 20 16:53:23 2020
    From Newsgroup: comp.databases.ms-sqlserv

    On Fri, 19 Jun 2020 13:29:19 -0400, "Ron Weiner" posted:

    Hello, Ron,
    Works perfectly
    Small correction:
    strCurDir = CurDir()
    instead of:
    strCurDir = CurDir() & "\"

    Thanks a lot
    Juergen
    --- Synchronet 3.21d-Linux NewsLink 1.2