Index: common/VBoxGuest/VBoxGuest-win.cpp
===================================================================
--- common/VBoxGuest/VBoxGuest-win.cpp	(revision 38746)
+++ common/VBoxGuest/VBoxGuest-win.cpp	(working copy)
@@ -109,6 +109,9 @@
                 case 1: /* Note: Also could be Windows 2008 Server R2! */
                     g_winVersion = WIN7;
                     break;
+				case 2:
+                    g_winVersion = WIN8;
+                    break;
                 default:
                     Log(("VBoxGuest::DriverEntry: Unknown version of Windows (%u.%u), refusing!\n",
                          majorVersion, minorVersion));
@@ -1255,6 +1258,14 @@
 #endif
             break;
 
+		case WIN8: /* TODO */
+#if ARCH_BITS == 64
+            enmOsType = VBOXOSTYPE_Win7_x64;
+#else
+            enmOsType = VBOXOSTYPE_Win7;
+#endif
+            break;
+
         default:
             /* We don't know, therefore NT family. */
             enmOsType = VBOXOSTYPE_WinNT;
Index: common/VBoxGuest/VBoxGuest-win.h
===================================================================
--- common/VBoxGuest/VBoxGuest-win.h	(revision 38746)
+++ common/VBoxGuest/VBoxGuest-win.h	(working copy)
@@ -143,7 +143,8 @@
     WINXP    = 3,
     WIN2K3   = 4,
     WINVISTA = 5,
-    WIN7     = 6
+    WIN7     = 6,
+	WIN8     = 7
 } winVersion_t;
 extern winVersion_t winVersion;
 
Index: WINNT/Installer/VBoxGuestAdditions.nsi
===================================================================
--- WINNT/Installer/VBoxGuestAdditions.nsi	(revision 38746)
+++ WINNT/Installer/VBoxGuestAdditions.nsi	(working copy)
@@ -622,6 +622,7 @@
   StrCmp $g_strWinVersion "2003" w2k    ; Windows 2003 Server
   StrCmp $g_strWinVersion "Vista" vista ; Windows Vista
   StrCmp $g_strWinVersion "7" vista     ; Windows 7
+  StrCmp $g_strWinVersion "8" vista     ; Windows 8
 
   ${If} $g_bForceInstall == "true"
     Goto vista ; Assume newer OS than we know of ...
@@ -714,6 +715,7 @@
   ; Do we need VBoxCredProv or VBoxGINA?
   ${If}   $R0 == 'Vista' ; Use VBoxCredProv on newer Windows OSes (>= Vista)
   ${OrIf} $R0 == '7'
+  ${OrIf} $R0 == '8'
     !insertmacro ReplaceDLL "$%PATH_OUT%\bin\additions\VBoxCredProv.dll" "$g_strSystemDir\VBoxCredProv.dll" "$INSTDIR"
     WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}" "" "VBoxCredProv" ; adding to (default) key
     WriteRegStr HKCR "CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}" "" "VBoxCredProv"                       ; adding to (Default) key
Index: WINNT/Installer/VBoxGuestAdditionsCommon.nsh
===================================================================
--- WINNT/Installer/VBoxGuestAdditionsCommon.nsh	(revision 38746)
+++ WINNT/Installer/VBoxGuestAdditionsCommon.nsh	(working copy)
@@ -514,6 +514,7 @@
   ; If we're on a 32-bit Windows Vista / 7 we can use the WDDM driver
   ${If} $g_strWinVersion == "Vista"
   ${OrIf} $g_strWinVersion == "7"
+  ${OrIf} $g_strWinVersion == "8"
     StrCpy $g_bCapWDDM "true"
   ${EndIf}
 !endif
Index: WINNT/Installer/VBoxGuestAdditionsUninstall.nsh
===================================================================
--- WINNT/Installer/VBoxGuestAdditionsUninstall.nsh	(revision 38746)
+++ WINNT/Installer/VBoxGuestAdditionsUninstall.nsh	(working copy)
@@ -84,6 +84,7 @@
   StrCmp $g_strWinVersion "2003" w2k    ; Windows 2003 Server
   StrCmp $g_strWinVersion "Vista" vista ; Windows Vista
   StrCmp $g_strWinVersion "7" vista     ; Windows 7
+  StrCmp $g_strWinVersion "8" vista     ; Windows 8
 
   ${If} $g_bForceInstall == "true"
     Goto vista ; Assume newer OS than we know of ...
@@ -141,6 +142,7 @@
   StrCmp $g_strWinVersion "2003" w2k    ; Windows 2003 Server
   StrCmp $g_strWinVersion "Vista" vista ; Windows Vista
   StrCmp $g_strWinVersion "7" vista     ; Windows 7
+  StrCmp $g_strWinVersion "8" vista     ; Windows 8
 
   ${If} $g_bForceInstall == "true"
     Goto vista ; Assume newer OS than we know of ...
Index: WINNT/Installer/VBoxGuestAdditionsW2KXP.nsh
===================================================================
--- WINNT/Installer/VBoxGuestAdditionsW2KXP.nsh	(revision 38746)
+++ WINNT/Installer/VBoxGuestAdditionsW2KXP.nsh	(working copy)
@@ -119,6 +119,7 @@
     StrCpy $reg_path_monitor "SYSTEM\CurrentControlSet\SERVICES\VBoxVideo\Device0\Mon00000001"
   ${ElseIf} $g_strWinVersion == "XP"
   ${OrIf} $g_strWinVersion == "7"
+  ${OrIf} $g_strWinVersion == "8"
     StrCpy $reg_path_device "SYSTEM\CurrentControlSet\Control\Video\$dev_id\0000"
     StrCpy $reg_path_monitor "SYSTEM\CurrentControlSet\Control\VIDEO\$dev_id\0000\Mon00000001"
   ${Else}
@@ -426,7 +427,8 @@
 !if $%BUILD_TARGET_ARCH% == "amd64"
     SetRegView 32
     ; Write additional keys required for Windows XP, Vista and 7 64-bit (but for 32-bit stuff)
-    ${If} $g_strWinVersion   == '7'
+    ${If} $g_strWinVersion   == '8'
+    ${OrIf} $g_strWinVersion == '7'
     ${OrIf} $g_strWinVersion == 'Vista'
     ${OrIf} $g_strWinVersion == '2003' ; Windows XP 64-bit is a renamed Windows 2003 really
       WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\VBoxOGL" "Version" 2
Index: WINNT/Installer/winver.nsh
===================================================================
--- WINNT/Installer/winver.nsh	(revision 38746)
+++ WINNT/Installer/winver.nsh	(working copy)
@@ -64,7 +64,8 @@
   StrCmp $R1 '5.1' lbl_winnt_XP
   StrCmp $R1 '5.2' lbl_winnt_2003
   StrCmp $R1 '6.0' lbl_winnt_vista
-  StrCmp $R1 '6.1' lbl_winnt_7 lbl_error
+  StrCmp $R1 '6.1' lbl_winnt_7
+  StrCmp $R1 '6.2' lbl_winnt_8 lbl_error
 
   lbl_winnt_x:
     StrCpy $R0 "NT $R0" 6
@@ -90,6 +91,10 @@
     Strcpy $R0 '7'
   Goto lbl_done
 
+  lbl_winnt_8:
+    Strcpy $R0 '8'
+  Goto lbl_done
+
   lbl_error:
     Strcpy $R0 ''
   lbl_done:
