Index: winpcap/nt5/x64/Packet.dll
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: winpcap\nt5\x64\Packet.dll
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: winpcap/nt5/x86/Packet.dll
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: winpcap\nt5\x86\Packet.dll
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: winpcap/Upgrading-Instructions.txt
===================================================================
--- winpcap/Upgrading-Instructions.txt	(revision 16844)
+++ winpcap/Upgrading-Instructions.txt	(working copy)
@@ -1,4 +1,4 @@
-How to upgrade Nmap to a new WinPcap release (2009)
+How to upgrade Nmap to a new WinPcap release (2010)
 ---------------------------------------------------
 
 1) Download the latest version of WinPcap from www.winpcap.org and make
@@ -10,26 +10,49 @@
    the license text from the installer into the LICENSE file which should
    be saved as PC file format (not UNIX) and ANSI encoding (not UTF-8).
 
+3) Extract the required files from the setup file using 7-Zip
+   (http://www.7-zip.org/). The installed files at time of writing are:
 
-3) Extract all the files from the setup file using 7-Zip
-   (http://www.7-zip.org/). Enter the $SYSDIR subdirectory. One by one,
-   extract (you can drag and drop) the different copies of the files.
-   Copy the files into the mswin32/winpcap directory (you may need to 
-   install WinPcap in order to determine the correct files; if you get
-   two similar looking files it's usually the smaller one). The installed
-   files at time of writing are:
-
+   x86:
         C:\Program Files\WinPcap\rpcapd.exe
         C:\Windows\system32\Packet.dll
         C:\Windows\system32\pthreadVC.dll
         C:\Windows\system32\wpcap.dll
         C:\Windows\system32\drivers\npf.sys
-   
-   The Vista version of Packet.dll needs to be extracted into the
-   mswin32/winpcap/vista subdirectory. Right click on each Packet.dll,
+
+   x64
+        C:\Program Files\WinPcap\rpcapd.exe
+        C:\Windows\SysWOW64\Packet.dll
+        C:\Windows\system32\Packet.dll
+        C:\Windows\SysWOW64\pthreadVC.dll
+        C:\Windows\SysWOW64\wpcap.dll
+        C:\Windows\system32\wpcap.dll
+        C:\Windows\system32\drivers\npf.sys
+
+   Check the Details tab to identify the NT5/NT6/AMD64 files. You will need to
+   extract the files (you can auto rename them to ensure all the files are there)
+   in order to view the descriptions.
+
+   We do not support NT4, so those files are not required.
+
+   The smaller NT5 version of Packet.dll needs to be extracted into the
+   mswin32/winpcap/nt5/x86 subdirectory. The larger NT5 version of
+   Packet.dll needs to be extracted into the mswin32/winpcap/nt5/x64
+   subdirectory.
+
+   The smaller Vista version of Packet.dll needs to be extracted into the
+   mswin32/winpcap/vista/x86 subdirectory. The larger Vista version of
+   Packet.dll needs to be extracted into the mswin32/winpcap/vista/x64
+   subdirectory.
+
+   The smaller version of wpcap.dll needs to be extracted into the
+   mswin32/winpcap subdirectory. The larger version of wpcap.dll
+   needs to be extracted into the mswin32/winpcap/x64 subdirectory.
+
+   The x86 version of npf.sys needs to be extracted into the
+   mswin32/winpcap subdirectory. Right click on each npf.sys,
    click "Properties", then select the "Version" tab. The
-   "Description:" field will have a string containing "NT4", "NT5", or
-   "Vista". We don't support NT4, so those files are not required.
+   "Description:" field will have a string containing "x86".
 
    The AMD64 version of npf.sys needs to be extracted into the
    mswin32/winpcap/x64 subdirectory. Right click on each npf.sys,
@@ -49,16 +72,23 @@
     var /GLOBAL my_ver
     StrCpy $my_ver "X.X.X.X"  <-- file version goes here
 
-6) Generate installer exe by compiling winpcap-nmap.nsi using the
+6) Generate the installer by compiling winpcap-nmap.nsi using the
    running the command
         makensis winpcap-nmap.nsi
+   Alternately, you can right click the script and select "Compile NSIS Script".
    makensis is part of the "Nullsoft Scriptable Install System" at
    http://nsis.sourceforge.net/.
 
 7) Give the installer a test, make sure the correct version appears in
    the installer's name and in Add/Remove Programs. You may also want to
    try installing it when it is already installed or an older version is
-   installed.
+   installed. Ideally this should be tested on as many platforms as possible.
+   The following should be a sufficient minimum, as Windows XP x64 is based
+   on 2003 x64, 2008 is based on Vista and 2008R2 is the same codebase as 7:
+        Windows XP
+        Windows 2003 x64
+        Windows Vista
+        Windows 7 x64
 
 8) Open mswin32/nsis/Nmap.nsi and update the references to the winpcap
    installer's name. You should only have to change the version number.
Index: winpcap/vista/x64/Packet.dll
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: winpcap\vista\x64\Packet.dll
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: winpcap/vista/x86/Packet.dll
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: winpcap\vista\x86\Packet.dll
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: winpcap/winpcap-nmap.nsi
===================================================================
--- winpcap/winpcap-nmap.nsi	(revision 16844)
+++ winpcap/winpcap-nmap.nsi	(working copy)
@@ -354,12 +354,11 @@
   StrCpy $R0 $R0 2 
   StrCmp $R0 '6.' vista_files
 
-  File Packet.dll
-  ; WanPacket.dll no longer present as of 4.1.0
+  File nt5\x86\Packet.dll
   Goto install
 
   vista_files:
-    File vista\Packet.dll
+    File vista\x86\Packet.dll
 
   install:
     
@@ -399,6 +398,20 @@
       ; disable Wow64FsRedirection
       System::Call kernel32::Wow64EnableWow64FsRedirection(i0)
       File x64\npf.sys ; x64 NT5/NT6 version
+      ; The x86 versions of wpcap.dll and packet.dll are 
+      ; installed into the right place further above.
+      ; install the 64-bit version of wpcap.dll into System32
+	  SetOutPath $SYSDIR
+      File x64\wpcap.dll ; x64 NT5/NT6 version
+      ; install the 64-bit version of packet.dll into System32
+      ; check for vista, otherwise install the NT5 version (for XP and 2003)
+      StrCpy $R0 $R0 2 
+      StrCmp $R0 '6.' vista_x64_packet
+      File nt5\x64\Packet.dll ; x64 XP/2003 version
+      Goto nt5_x64_packet_done
+      vista_x64_packet:
+      File vista\x64\Packet.dll ; x64 Vista version
+      nt5_x64_packet_done:
 	  WriteRegStr HKLM "Software\WinPcap" "" "$PROGRAMFILES64\WinPcap"
       ; re-enable Wow64FsRedirection
       System::Call kernel32::Wow64EnableWow64FsRedirection(i1)
@@ -460,9 +473,9 @@
   Delete $INSTDIR\LICENSE
   Delete $INSTDIR\uninstall.exe
 
+  ; This deletes the x86 files from SysWOW64 if we're on x64.
   Delete $SYSDIR\Packet.dll
   Delete $SYSDIR\pthreadVC.dll
-  ; No longer need to delete WanPacket.dll as of WinPcap 4.1.0.
   Delete $SYSDIR\wpcap.dll
 
   ; check for x64, delete npf.sys file from system32\drivers
@@ -474,6 +487,9 @@
   System::Call kernel32::Wow64EnableWow64FsRedirection(i0)
 
   Delete $SYSDIR\drivers\npf.sys
+  ; Also delete the x64 files in System32
+  Delete $SYSDIR\wpcap.dll
+  Delete $SYSDIR\Packet.dll
 
   ; re-enable Wow64FsRedirection
   System::Call kernel32::Wow64EnableWow64FsRedirection(i1)
Index: winpcap/x64/wpcap.dll
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: winpcap\x64\wpcap.dll
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

