This is our old Q&A Site. Please post any new questions and answers at

I created one plugin in lua. now i am making installer for that using NSIS At the time of uninstallation of my plugin i want to check if wireshark is running than donot uninstall it. I got logic todo that from wireshark.nsi(logic is defined in common.nsh) file.But in that logic there is mentioned one GUID Number {9CA78EEA-EA4D-4490-9240-FC01FCEF464B}. The logic of that file is mentioned below


System::Call 'kernel32::OpenMutex(i 0x100000, b 0, t "Global\${PROGRAM_NAME}-is-running-{9CA78EEA-EA4D-4490-9240-FC01FCEF464B}") i .R0'
    IntCmp $R0 0 checkRunningSession
    System::Call 'kernel32::CloseHandle(i $R0)'
    Goto isRunning

System::Call 'kernel32::OpenMutex(i 0x100000, b 0, t "${PROGRAM_NAME}-is-running-{9CA78EEA-EA4D-4490-9240-FC01FCEF464B}") i .R0'
    IntCmp $R0 0 notRunning
    System::Call 'kernel32::CloseHandle(i $R0)'

; You'd better go catch it.
MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION "${PROGRAM_NAME} or one of its associated programs is running.$\r$\nPlease close it first." /SD IDCANCEL IDRETRY continueChecking


I want to this GUID no is constant for wireshark?I mean is it same for platforms? If it so how it is integrated with Wireshark? Is it mentioned in wireshark source code?

asked 15 Jul '15, 02:42

ankit's gravatar image

accept rate: 25%

Yes it's a constant for all versions of Wireshark running on Windows and is defined in wsutil\file_util.c:


arguably it should be in a header so it can be picked up by wireshark.nsi instead of being hard-coded, but it's unlikely to ever change.

permanent link

answered 15 Jul '15, 03:42

grahamb's gravatar image

grahamb ♦
accept rate: 22%

Thanks @grahamb for quick reply.May be my next question to you is not specific to wireshark. but i am just curious to know that how you guys generated this ID and integrated with wireshark? because as far as i know about GUID. it is generated by system itself randomly or by GUIDgen tool

(15 Jul '15, 04:00) ankit

Probably via a tool. The commit message is here.

Generating and using a GUID in this manner is perfectly safe, what's your concern?

(15 Jul '15, 05:39) grahamb ♦

Actually we have our own tool which is developed in Qt same as wireshark and it has problem like when the tool is open user can uninstall that but ideally it should not happen. then i have referred wireshark code to implement same logic to generate GUID. that's why i was asking. But now i get idea how to do that from your previous answer. Thanks again @grahamb

(16 Jul '15, 20:29) ankit
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 15 Jul '15, 02:42

question was seen: 1,399 times

last updated: 16 Jul '15, 20:29

p​o​w​e​r​e​d by O​S​Q​A