Advertisement
3DotDev

Détecter architecture PC (Framework 4, 3.5 et antérieures)

Aug 16th, 2013
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.97 KB | None | 0 0
  1. '########################################################
  2. ' Credits 3DotDev from http://3dotdevcoder.blogspot.fr/
  3. '########################################################
  4.  
  5. '########################################################
  6. ' Retourne architecture du PC (avec Framework 4 installé)
  7. '########################################################
  8. Public Function GetArchitecture() As String
  9.     If Environment.Is64BitOperatingSystem Then
  10.         Return "x64 Bits"
  11.     End If
  12.     Return "x32 Bits"
  13. End Function
  14.  
  15. '##########################################################################
  16. ' Retourne architecture du PC (version antérieure au Framework 4 installée)
  17. '##########################################################################
  18. Public Function GetArchitecture() As String
  19.     If Not Environment.GetFolderPath(Environment.SpecialFolder.SystemX86).ToUpper().Contains("SYSTEM32") Then
  20.         Return "x64 Bits"
  21.     End If
  22.     Return "x32 Bits"
  23. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement