I have added, in this case, the wireshark directory to my env var path and can type "wireshark.exe" from anywhere on my system to launch the program.

I would liek to be able to type "wireshark" or "ws" or something like that to launch the program, is there a way to define a variable which when typing "ws" would allow it to be processed as "wireshark.exe"?


  • 1
    doskey ws=wireshark ?? – STTR Jan 30 '15 at 0:54
  • @STTR yeah.. C:\>doskey ws="c:\Program Files\Wireshark\Wireshark.exe" though need a tweak to get it to run automatically(going to the reg entry mentioned in cmd /? that names a bat that runs automatically, then making that bat include the doskey command). A ws.bat might be quicker to set up. – barlop Jan 30 '15 at 13:09

You can create a batch file named ws.bat that launches Wireshark.exe and save it to your PATH.

  1. Open Notepad and enter the following text:

    "C:\Program Files\Wireshark\Wireshark.exe"

  2. Save the file as ws.bat in C:\Windows\System32 or any other directory in your PATH that you have access to.

Now you can launch Wireshark.exe by simply entering ws at the command line or in Start -> Run.

More info:

  • -1 Since you're going to write baby steps like that i'd point out, A)he's then going to have two bat files one on the desktop and one in c:\windows\system32 You should tell him he can remove the one on the desktop if you're writing baby steps telling him he has to put it there B)He can't save in c:\windows\system32 unless he has admin priv i.imgur.com/YfM7Hzu.png If you're going to write baby steps telling him to enter a path exactly as you write it and to put an icon where you say, then tell him what to do with the cmd prompt - be consistent. – barlop Jan 30 '15 at 13:06
  • C) If you don't write a proper explanation and just write baby steps like that then people that do'nt know much will not easily learn. You should explain about the Path, and you should write concisely at the start what it is you are doing, so an expert can see exactly what you are doing without having to read your baby steps, which is unnecessarily tedious. – barlop Jan 30 '15 at 13:07
  • @barlop Thank you for your feedback. I have updated the answer. – user387876 Jan 30 '15 at 17:09
  • +1 That is much better, a very good update. – barlop Jan 31 '15 at 22:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.