Has the topic been discussed in >https://groups.google.com/d/msg/microsoft.public.de.access/_gH9df68QMU/8hjruDxWAQAJ,
or is there still some feedback?
The following shows me the build numberI 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.
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
there is no simple single command that provides this information. DidHas the topic been discussed inI have asked the same question again here because this is an international group.
https://groups.google.com/d/msg/microsoft.public.de.access/_gH9df68QMU/8hjruDxWAQAJ,
or is there still some feedback?
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.
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,
Ho Ron,That is what the function returns, see "12827.20268" part of the return value. ?GetVerInfo("msaccess.exe")
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
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
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
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
Ron Weiner presented the following explanation :Not weird; I wish more would post back solutions they found.
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
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 59 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 20:55:18 |
| Calls: | 810 |
| Calls today: | 1 |
| Files: | 1,287 |
| D/L today: |
11 files (21,026K bytes) |
| Messages: | 194,568 |