*) Ask the user if they want to install WinPcap.
authorgal <gal@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 28 Jan 2007 10:10:06 +0000 (10:10 +0000)
committergal <gal@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 28 Jan 2007 10:10:06 +0000 (10:10 +0000)
*) Associate Wireshark with p7s, p7m and p7c files (if not already associated).

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20582 f5534014-38df-0310-8fa8-9805f1628bb7

packaging/u3/win32/u3util.c

index 172d3b25372b7bfe6afd0f1660e9f1d0f57e0083..9cda4bec540fbb32965302d4ab4f6faa2c2cc28a 100644 (file)
@@ -81,6 +81,9 @@ static char *extensions[] = {
   ".pfx",
   ".asn",
   ".spf",
+  ".p7c",
+  ".p7s",
+  ".p7m",
   NULL
 };
 
@@ -477,8 +480,11 @@ void host_configure(void)
     RegCloseKey(key);
   }
 
-  if(!hasWinPcap) {
-    /* XXX: we should ask the user if they want to install - and remember it */
+  if(!hasWinPcap && 
+     (MessageBox(NULL, 
+                TEXT("If you want to capture packets from the network you will need to install WinPcap.\nIt will be uninstalled when you remove your U3 device.\n\nDo you want to install WinPcap?"), 
+                TEXT("U3 Wireshark: Install WinPcap?"), 
+                MB_YESNO|MB_TOPMOST|MB_ICONQUESTION) == IDYES)) {
 
     /* compute the U3 path to the WinPcap installation package - it stays on the device */
     u3_device_exec_path = getenv("U3_DEVICE_EXEC_PATH");