Show service pack in Visual basic/studio

vbimport

#1

Hi everybody

I’m a informatics student and I have to make a program for my hardware teacher, this program must contain some scripts to see what your hardware is.

some examples

  • total virtual and physical memory
  • used virtual and physical memory
  • used OS and so on…

my question is this: I’m trying to let the application tell the user which Service pack he has running on his windows Platform.

for example: I haven windows vista ultimate service pack 1
then the application should say: Service Pack 1

who can help me?


#2

The Windows OS information can be pulled directly from the registry.


#3

[QUOTE=g3rr3;2168931]some examples

  • total virtual and physical memory
  • used virtual and physical memory
  • used OS and so on…?[/QUOTE]
    Search “Memory Management Functions” in the MSDN and you find the function “GlobalMemoryStatusEx”. This function returns all values you want in the structure “MEMORYSTATUSEX”

[QUOTE=g3rr3;2168931]My question is this: I’m trying to let the application tell the user which Service pack he has running on his windows Platform.

for example: I haven windows vista ultimate service pack 1
then the application should say: Service Pack 1[/QUOTE]
The API function “GetVersionEx” returns the information about the service pack. You have to read out the “szCSDVersion” value of structure “OSVERSIONINFOEX”

Note:
You can find all information in the MSDN (Microsoft Developer Network) http://msdn.microsoft.com