/build/static/layout/Breadcrumb_cap_w.png

wireshark Wireshark

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login
Views: 7.4k  |  Created: 04/05/2008

Average Rating: 0
Wireshark has 43 inventory records, 1 Questions, 0 Blogs and 2 links. Please help add to this by sharing more!

Deployment Tips (2)

Most Common Setup Type
Legacy Setup with no known command line support
Average Package Difficulty Rating
Rated 2 / 5 (Somewhat Easy) based on 2 ratings
Most Commonly Reported Deployment Method
Windows Installer Command Line (No MST)
1
Note

You can simply start the Wireshark installer without any command line parameters, it will show you the usual interactive installer.

For special cases, there are some command line parameters available:

  • /NCRC disables the CRC check

  • /S runs the installer or uninstaller silently with default values. Please note: The silent installer won't install WinPCap!

  • /desktopicon installation of the desktop icon, =yes - force installation, =no - don't install, otherwise use defaults / user settings. This option can be useful for a silent installer.

  • /quicklaunchicon installation of the quick launch icon, =yes - force installation, =no - don't install, otherwise use defaults / user settings.

  • /D sets the default installation directory ($INSTDIR), overriding InstallDir and InstallDirRegKey. It must be the last parameter used in the command line and must not contain any quotes, even if the path contains spaces

"wireshark-win32-1.9.0.exe /NCRC /S /desktopicon=yes
  /quicklaunchicon=no /D=C:\Program Files\Foo"

Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
0
Script

I've created 2 scripts, one for installation and one for removal.

==========Install===========

The script is created for Wireshark-win64-1.8.4.exe, but you can modify it for any version.

Install.vbs:

 Option explicit

'=============================
'==== Install Wireshark ====
'=============================
Dim strScriptPath : strScriptPath = Left(WScript.ScriptFullName, InStrRev(WScript.ScriptFullName, "\")-1)
Dim objWSH
Dim strArch
Dim SetupCMD
Set objWSH = CreateObject("WScript.Shell")

DisableSecurity()
'Installation will be done without Desktop Icon and Quicklaunch Icon
SetupCMD = """" & strScriptPath & "\Wireshark-win64-1.8.4.exe" & """" & " /S /NCRC /desktopicon=no /quicklaunchicon=no"
objWSH.Run SetupCMD


'=================================
'==== Install WinPCap 4.1.2 ====
'=================================
Dim MSIInstalCMD
Dim ProductCode

ProductCode = "{342A9145-3489-4533-A21D-C4D9AEEE2F9D}"
MSIInstalCMD = "msiexec /i """ & strScriptPath & "\WinPCap 4.1.2 x64 en.msi"" /qn"

objWSH.Run MSIInstalCMD,,True

'=============================
'==== Sub's and Functions ====
'=============================

Sub DisableSecurity()
Dim objEnvProc, objWSH
Set objWSH = CreateObject("WScript.Shell")
Set objEnvProc = objWSH.Environment("PROCESS")
objEnvProc("SEE_MASK_NOZONECHECKS") = 1
End Sub
  • Because in silent mode installation the WinPCap is not installed during Wireshark installation I added a section to install WinPCap msi using msiexec command. You can find the section to line 18.
  • The installation is completely silent.
  • Important: The Wireshark executable name and WinPCap msi name are hardcoded in the installation script. You can modify them if you want. You can find them to line 13 and line 24.

 =========Remove==========

For removal I created a script to read the UninstallStrig registry key from:

  • "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark\UninstallString" - if the application is installed on a x86 Windows
  • "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark\UninstallString" - if the application is installed on a x64 Windows

Remove.vbs:

 Option explicit

'=============================
'==== Uninstall Wireshark ====
'=============================

Dim UninstallStr_x86
Dim UninstallStr_x64
Dim UninstallStr
UninstallStr_x86 = "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark\UninstallString"
UninstallStr_x64 = "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Wireshark\UninstallString"

DisableSecurity()

If ProcArchitecture("x86") then
If ExistRegKey(UninstallStr_x86) then
UninstallStr = GetRegValue(UninstallStr_x86)
Launch_App UninstallStr, "/S"
End IF
End if

If ProcArchitecture("AMD64") then
If ExistRegKey(UninstallStr_x86) then
UninstallStr = GetRegValue(UninstallStr_x86)
'msgbox UninstallStr
Launch_App UninstallStr, "/S"
End IF
If ExistRegKey(UninstallStr_x64) Then
UninstallStr = GetRegValue(UninstallStr_x64)
'msgbox UninstallStr
Launch_App UninstallStr, "/S"
End IF
End if

'=================================
'==== Uninstall WinPCap 4.1.2 ====
'=================================
Dim MSIRemoveCMD
Dim ProductCode
Dim objWSH

Set objWSH = CreateObject("WScript.Shell")
ProductCode = "{342A9145-3489-4533-A21D-C4D9AEEE2F9D}"
MSIRemoveCMD = "msiexec /x " & ProductCode & " /QN"

If MSIInstalled(ProductCode) then
objWSH.Run MSIRemoveCMD,,True
End If


'=============================
'==== Sub's and Functions ====
'=============================
Function ExistRegKey(regKey)
Dim wshShell, str
Set wshShell = CreateObject("WScript.Shell")
On Error Resume Next
str = wshShell.RegRead(regKey)
If str = "" Then
ExistRegKey = False
Else
ExistRegKey = True
End If
Set wshShell = Nothing
End Function

Function GetRegValue(regKey)
Dim wshShell, str
Set wshShell = CreateObject("WScript.Shell")
If ExistRegKey(regKey) Then
str = wshShell.RegRead(regKey)
GetRegValue = str
Else
GetRegValue = "NOT FOUND"
End If
Set wshShell = Nothing
End Function

Function Launch_App (strExePath, strArg)
Dim strScriptPath : strScriptPath = Left(WScript.ScriptFullName, InStrRev(WScript.ScriptFullName, "\")-1)
Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
'msgbox strExePath & " " & strArg
WshShell.Run strExePath & " " & strArg,,True

End Function

Sub DisableSecurity()
Dim objEnvProc, objWSH
Set objWSH = CreateObject("WScript.Shell")
Set objEnvProc = objWSH.Environment("PROCESS")
objEnvProc("SEE_MASK_NOZONECHECKS") = 1
End Sub

Function MSIInstalled(strProductCode)
Dim colList
Dim strItem
Dim objWI
Set objWI = CreateObject("WindowsInstaller.Installer")

For Each strItem In objWI.Products
If UCase(strProductCode) = UCase(strItem) Then
MSIInstalled = True
Exit Function
End If
Next
MSIInstalled = False
End Function

Function ProcArchitecture(strProcArch)
Dim strArch
Dim objEnvSys
Dim objWSH

Set objWSH = CreateObject("WScript.Shell")
Set objEnvSys = objWSH.Environment("System")

strArch = objEnvSys("PROCESSOR_ARCHITECTURE")

If UCase(strArch) = UCase(strProcArch) then
ProcArchitecture = True
Else
ProcArchitecture = False
End If
End Function
  • The removal is totaly silent

 

Important: Both scripts have to be placed in the same folder with Wireshark setup executable and WinPCap 4.1.2 x64 en.msi.

 

Setup Information:
Setup Type: Legacy Setup with command line support
Deployment Method Used: Vendor Provided Command Line (switch driven)
Deployment Difficulty: Very Easy
Platform(s): Windows

Questions & Answers (1)

Questions & Answers related to wireshark Wireshark

2
ANSWERS

Blogs (0)

Blog posts related to wireshark Wireshark

Reviews (0)

Reviews related to wireshark Wireshark

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ