Home > .net, gadgets > New software for your USB Panic Button

New software for your USB Panic Button

November 30th, 2008

I have got this gadget last year with Christmas and it looks very cool but with the included software it is pretty useless. It works like a boss key and when you hit it after a short delay it displays a low res chart on your screen…

It was on my “programming-for-fun-todo-list” for a whole year to make my own software for this cool gadget. I have used Jan Axelson’s Generic HID C# example to make it work. And finally it is here: USB Panic Button.zip (Updated version 1.1!)

With this new XP and Vista compatible software you can display any picture, play any .wav file and execute any command you want even simultanously. As a bonus I have include some image, sound and command examples, a cool earthquake effect and PowerPoint next slide control. This software requires the .NET 2.0 Framework.

Enjoy! And please drop a comment…

UPDATE 2009-10-06: You can download the source code here: USBPanicButton_src.zip

USB Panic Button

.net, gadgets

  1. November 30th, 2008 at 21:41 | #1

    Now with the USB Panic Button you can always have one at your side at work. Pedro Glass

  2. Damian
    December 2nd, 2008 at 13:59 | #2

    FYI If you access the download link from the direct page,
    http://www.johnbruin.net/index.php/2008/11/30/new-software-for-your-usb-panic-button/
    the link points to:
    http://www.johnbruin.net/index.php/2008/11/30/new-software-for-your-usb-panic-button/files/usb%20panic%20button.zip

    When in-fact the download is actually located at:
    http://www.johnbruin.net/files/usb%20panic%20button.zip

    Your software does not actually work for me, perhaps you need to run Vista as admin? (might try it on XP and see if I have more luck)

  3. John Bruin
    admin
    December 2nd, 2008 at 15:58 | #3

    Hi Damian, thanks for your comment. You are right, I have fixed the location of the .zip file.
    I have tested my software on XP and Vista and it works on several machines. Can you please try to run it as Admin? Please let me know!

  4. Damian
    December 3rd, 2008 at 03:57 | #4

    I just tested on Win XP and it works fine.
    Will test on Vista again if I get the chance. (note that it was Vista 64 – bit) The app launches and is in the task bar, but pressing the “panic button” has no effect.

  5. Damian
    December 3rd, 2008 at 11:30 | #5

    I just tested Vista again as Admin – still no luck in getting it to work. The supplied app on the CD works fine however in Vista 64 bit (even in non-admin)

  6. ME
    December 4th, 2008 at 18:02 | #6

    Thats great, we have the QI Klaxon on it, don’t bother with Vista, but do try and make it work for Mac!

  7. HJ
    December 6th, 2008 at 11:35 | #7

    Great software. Are there more vbs scripts available on the web.
    Would be great to have a feature that if you press the button twice (quick) that CTRL ALT DEL is sent to the computer so pc can be unlocked.

    New release coming up? :)

  8. HJ
    December 7th, 2008 at 22:50 | #8

    Hey, me again.
    I am trying to use commands with a slash in it e.g. to start a batch file minimized but it’s not picking up the slashes at all. Any way to get this fixed?

  9. John Bruin
    admin
    December 9th, 2008 at 10:04 | #9

    @HJ
    Maybe you should use quotes in your command like this “C:\test.bat /m”
    or you can always wrap your command in another batch file.

  10. panic.button
    December 10th, 2008 at 15:52 | #10

    this is awesome, thanks!
    works on windows server 2003
    Are you going to release the source code ?
    I am running twin monitors and the images do not stretch across :(

  11. ME
    December 16th, 2008 at 17:54 | #11

    I’d like random sounds, could an updated versions pick randomly from a folder, or can someone write a batch for us thickys to impliment that does it. And also, could it not support MP3 as well?

  12. snatcho
    December 29th, 2008 at 11:53 | #12

    Cool! Thanks a lot. I’ve just placed my panic button back on the desk after many months locked away. Now it’s useful at last!

  13. Andre
    January 4th, 2009 at 11:30 | #13

    Thanks soo much!
    i’ve always thought that the standard software was pretty useless, but now i always have my panic button plugged in and i use it almost 20 times a day!!!!!

  14. January 6th, 2009 at 16:09 | #14

    Thank you!! I just received this product in my Bag of Crap from woot, and this is awesome!!! A+

  15. panic.button
    January 6th, 2009 at 18:30 | #15

    this stops working after a bit, not sure what the trigger is, but I have to shut your program and unplug the button before plugining it back in again and rerunning the exe

  16. January 7th, 2009 at 06:54 | #16

    I’m trying to make it so that when i press the button, it will be like pressing the number 2 on the top part of the keyboard (In MAME, the 2 key adds quarters to the ROMs)

    Can anyone please help me do that? it would be much appreciated!

    Thanks!

  17. The 64th bit
    January 7th, 2009 at 23:45 | #17

    I’m running 64bit Vista, and while the software runs, pressing the panic button has no effect. I’ve tried running it as Administrator, but it still doesn’t work.

  18. Henry
    January 8th, 2009 at 01:23 | #18

    @admin
    Great software. Works fine on 32-bit Vista but fails to launch anything when running on 64-bit version.

  19. littletinymonkey
    January 8th, 2009 at 02:38 | #19

    Got my in a BOC from Woot, too.. this is perfect. I was gonna trash it until I found your app.. Thanks Google and John Bruin

  20. guest
    January 8th, 2009 at 17:29 | #20

    Any chance of getting a command script that just minimizes the active window?

    Thanks

  21. Jon
    January 13th, 2009 at 01:01 | #21

    I have the Panic Button but with Vista 64 I just cannot get it to work! any ideas?

  22. Chris
    January 14th, 2009 at 21:44 | #22

    Zachary :
    I’m trying to make it so that when i press the button, it will be like pressing the number 2 on the top part of the keyboard (In MAME, the 2 key adds quarters to the ROMs)
    Can anyone please help me do that? it would be much appreciated!
    Thanks!

    make a text file with notepad, and name it “sendkey.vbs” or whatever, put this into the text file:

    Dim objShell
    Set objShell = CreateObject(“WScript.Shell”)
    objShell.SendKeys “{backspace}”, True

    Change “{backspace}” to “2″ for your purposes.

  23. Chris
    January 14th, 2009 at 21:59 | #23

    guest :
    Any chance of getting a command script that just minimizes the active window?
    Thanks

    Same trick as my last reply, but instead use: “% n” instead of “{backspace}”

  24. Mark
    January 16th, 2009 at 00:23 | #24

    I tried the trick for getting it to use a hotkey (F10) but it says it says there is an invalid character in line 3. I copied and pasted just the way it was.

  25. panic.button
    January 16th, 2009 at 16:08 | #25

    Its a real pity the source code is not available.

    i tried the generic C# code/app it finds the button but can not get any events from it :(

  26. panic.button
    January 19th, 2009 at 13:14 | #26

    finally worked it out, just avoid control and input/output requests and use the feature reports.

  27. gavin
    January 19th, 2009 at 15:01 | #27

    Does any kind soul have the original driver disk, i’ve lost mine over xmas and can’t get the button to work at all without it, i’m running vista 64 bit, this app looks great tho :)

  28. Kyle
    January 21st, 2009 at 08:19 | #28

    I’m having problems with this not working on my 64-bit Vista. Does anyone have any solutions???

  29. panic.button
    January 22nd, 2009 at 18:19 | #29

    have uploaded original CD contents to rapidshare.
    http://rapidshare.com/files/187752045/usbpanicbuttoncdcontents.zip.html

  30. fred
    January 26th, 2009 at 03:05 | #30

    Thank you thank you thank you.

    I spent 3 hours trying to find a way to get VB to access USB devices only to find out my version can’t do it. I found some source code for USB interaction and i’d get errors when I tried to open it… It looks like VB ad USB are not good bed fellows.

    I don’t suppose you would post your source code :) It’d give me a reason to catch up on my C#

  31. Jack
    January 28th, 2009 at 08:47 | #31

    Hey thanks for this, got the Panic Button as a novelty gift from a friend that knows I like goofy gadgets. This software makes it actually worth plugging in! =)

  32. Bill
    February 2nd, 2009 at 09:58 | #32

    Thanks for this update! I wonder if you could give me the opportunity to set a default script so the customer doesn’t have to choose a file manually. This would be so nice!

  33. Adrian P
    February 4th, 2009 at 18:33 | #33

    Love you man, great software!!

  34. Chris L
    February 6th, 2009 at 10:19 | #34

    This is exactly what I was looking for, I wanted to push a big red button to run a whole lot of code for my reports at work.

    I haven’t bought this product yet, but I assume it can be set up to do one of the following once pushed:

    1. Open a specific excel spreadsheet.
    2. Open a specific ms access database.
    or
    3. Open a MDDos Batch.exe file.

    These will then kick off all my code.

  35. Jesse
    February 10th, 2009 at 00:23 | #35

    Personally, I use it in combination with autohotkey. I assume the author wrote this program after I posted code on kbabslive: USB Panic Button (HACKED!) Post (google: USB panic button hacked). I used Jan Axelson’s code as a base as well, and I actually released my source code.

    http://www.orkey.net/bin/PanicTray.zip

    binary and source code inside.

    it’s called generichid because I just lazily modded the original generic hid project, but you can rename the exe to whatever you like. It will work fine.

    on the command line, if you rename generichid.exe to panictray.exe you can use something like:

    C:\panictray.exe somefile.exe panic

    and it will auto-run in the tray listening for a button press.

    An excel spreadsheet, access database, or batch file… or .ahk (autohotkey file) all work perfectly fine to “run” with this program.

  36. A Reader
    February 13th, 2009 at 10:13 | #36

    Thank you so much. This thing work great. The original software dose nothing but loading a image. Instead your software really rocks! Now mu button isn’t useless anymore!

  37. Conan
    February 20th, 2009 at 00:20 | #37

    Hi John, found your blog via the MIX 10k competition. Once again, congrats on Silvertyper – definitely one of my fave entries. Oddly enough I got a panic button just this Christmas gone, and my first thought was ‘how can I hack this to make it do something useful or at least _interesting_?’

    Lo and behold – you’ve done it already :)

    Cheers John, this has probably saved me hours of searching!

  38. chris
    February 21st, 2009 at 09:59 | #38

    First of all please excause my bad english. I’ve downloaded your very nice USB Panic Button Software and I tried to make it portable but the configuartion file is stored in the local app-directory and looks like this USB_Panic_Button.exe_Url_dzl5zpik2wdnipbqq1dk0d0wmcp10jzi. I think there are some factors that the last part (dzl5…) dependes on, because a differnt execute-path effects a different config-path (is the algorithm a secret? or is there a way to change the config path?)

    THX for help

  39. dave jones
    February 24th, 2009 at 19:15 | #39

    Awesome! I was so disappointed with the s/w that came with it this works great u r muh hero!

  40. Colin
    February 25th, 2009 at 06:02 | #40

    I just got my panic button from woot.com and was going to spend hours writing my own program for it. Thanks very much for saving me the time. Your program works perfectly with some nice features and the earthquake effect is worth a laugh.

  41. Trina
    February 25th, 2009 at 09:45 | #41

    WOW! Thank you for sharing this programming. I’d just purchased a USB Panic Button for fun and realized how lacking the default application was. Yours makes this thing actually usefull instead of a silly novelty.

  42. Alexwebmaster
    March 3rd, 2009 at 18:28 | #42

    Hello webmaster
    I would like to share with you a link to your site
    write me here preonrelt@mail.ru

  43. daniel
    March 6th, 2009 at 15:39 | #43

    Hi im using vista 64 like some others and cannot get this to work under any mode. It looks like a great piece of SW any chance of a 64 bit patch?

    cheers my email is: dandman_66@hotmail.co.uk

  44. JohnB
    March 17th, 2009 at 17:28 | #44

    Looks cool.

    Is there any chance this software could be modified to support the “one touch” button found on various external USB drive enclosures?

    I’m not a programmer, so I’m not sure if they are HID-compliant devices or not.

    Just a thought…

    JohnB

  45. JohnB
    March 17th, 2009 at 20:44 | #45

    Just a follow-up to my previous post:

    Like I said, I’m not a programmer or anything. But after doing a little research, it looks like the “one touch” buttons found on many external USB drive enclosures are implemented as a Generic HID device.

    I assume your application is hard-coded to use the Panic Button’s ProductID & VendorID.

    Would it be possible to modify your settings window so that you could set the ProdutID & VendorID to work other Generic HID devices?

    JohnB

  46. Chris
    March 19th, 2009 at 21:26 | #46

    Great software! It’s most powerful that the original software!
    But, I would like – if possible – to make some tweaks, can you distribute the source code ?

    Thank you
    Chris

  47. Chris
    March 28th, 2009 at 11:19 | #47

    Chris :
    Great software! It’s most powerful that the original software!
    But, I would like – if possible – to make some tweaks, can you distribute the source code ?
    Thank you
    Chris

    my email: christouf@gmail.com

    Thanks
    Chris

  48. Junky
    April 2nd, 2009 at 16:32 | #48

    Please make it work for 64 bit vista i have only computers with that OS…

  49. John Bruin
    admin
    April 4th, 2009 at 12:25 | #49

    Hi Junky, there are lots of questions about making my software available for 64 bit but unfortunately I have no 64 bit environment to test…

  50. Junky
    April 9th, 2009 at 09:54 | #50

    Yes I made it work in 64 bit version i will (when i get home from school today) upload it and get the link up here. questions how I dit it, well I used Xenocode on a 32 bit machine and virtualized it then when I run it, it works! I know the method is not the best but it works:) I’ll upload it ASAP!

  51. Junky
    April 14th, 2009 at 13:06 | #51

    well here is the link:
    http://www.filefactory.com/file/agbde4f/n/Panic_Button_rar
    hope it works for you 2:)

  52. John Bruin
    admin
    April 14th, 2009 at 22:04 | #52

    @Junky Thanks Junky! Is there anyone who can test and confirm this?

  53. he 64th bit
    April 21st, 2009 at 00:07 | #53

    admin :
    @Junky Thanks Junky! Is there anyone who can test and confirm this?

    I just tested it out using a picture, sound and the Earthquake option under Vista 64-bit and it worked great! Thanks Junky!!

  54. Blake
    May 6th, 2009 at 04:07 | #54

    Could I please have the source code for this app? Pretty please?

  55. cruzader
    May 7th, 2009 at 07:00 | #55

    does the software support using multiple panic buttons?
    one for each cooldown in wow would look priceless :D

  56. May 13th, 2009 at 00:25 | #56

    Nice, very nice. I love it. I took the button and used a script and autohotkey to launch a missile out of a usb missile launcher. Everything I used I got from http://www.woot.com

    http://www.youtube.com/watch?v=RiOBCVw47qA

  57. John Bruin
    admin
    May 14th, 2009 at 21:51 | #57

    WOW Duncan! That is so cool! I also own a USB Missile Launcher and this combination rules! I also love your youtube movie.

  58. Simon
    June 13th, 2009 at 15:53 | #58

    thank you Junky ! It’s work on Vista64 !

  59. Digin
    June 22nd, 2009 at 16:39 | #59

    I’ve got the panic button for father’s day. With your software this gadget works perfect. Thanks

  60. Tracy
    June 25th, 2009 at 15:48 | #60

    Jesse :
    Personally, I use it in combination with autohotkey. I assume the author wrote this program after I posted code on kbabslive: USB Panic Button (HACKED!) Post (google: USB panic button hacked). I used Jan Axelson’s code as a base as well, and I actually released my source code.
    http://www.orkey.net/bin/PanicTray.zip
    binary and source code inside.

    This link doesn’t seem to work for me. Is the source/binary still available? Can anyone provide a link to it? Thanks!!!

  61. July 1st, 2009 at 09:12 | #61

    Hey, that link should work now. Good luck with it!

  62. July 1st, 2009 at 09:18 | #62

    I should note that the version I linked is my version, released before Mr. Bruin’s. It’s less polished (read: kind of a cheap hack) and the interface is more like the test app on which he based his solution. At the time I really just wanted something that would work, and unlike Mr. Bruin’s solution, it does indeed include the modified source code, and something of a debugging interface. To launch it at start, you can use a command line option as well. Something like ‘panictray.exe “C:\bin\somefile.exe” panic’ . It will start listening for a button press on startup and minimize itself to the system tray.

  63. Gover
    July 3rd, 2009 at 08:36 | #63

    Great work!The software is better that the orginal one.

  64. Lars Hundebøl
    July 22nd, 2009 at 07:46 | #64

    How did you know which vendor – and product id to use?

  65. John Bruin
    admin
    August 11th, 2009 at 22:03 | #65

    You can find the vendor and product id in the Device Manager

  66. JohnB
    September 28th, 2009 at 21:10 | #66

    Is this software TenX chip-specific (i.e.: does it require the TenxHID.dll)? I would like to try to modify it & possibly get it to work with some other similar “panic button”-type gadgets I’ve got that are based on different chipsets.

    Also, would you be able to send me the source code or make it avaialable for download? My email address is: johnbeekman@yahoo.com.

    thanks in advance,
    JohnB

  67. September 28th, 2009 at 23:14 | #67

    @JohnB

    I’ve written a Python application which serves a similar purpose to this application although it’s command-line based. It can either run a command or simulate pressing a certain key combination. The source code is available and you’re welcome to see if it helps you JohnB.

  68. Brian
    September 29th, 2009 at 21:43 | #68

    @ME
    Was anyone able to come up with a way for the audio played to be random? I’ve got the panic button, the new executable works great, I’m just not real handy with the batch files, etc. Thanks for any help!

  69. JohnB
    September 30th, 2009 at 16:30 | #69

    @awatts
    Thanks, awatts. Yes, I’ve looked at your Python stuff for the Panic Button – pretty cool. Unfortunately, it’s TenX-specific.

    As I said in my post, I’m trying to come up with something that will work with some similar devices I’ve got that use different chipsets (Dream Cheeky’s Stress Button & something called a USB Security Button).

    Anyway, do you know if Jon Bruin’s software is TenX-specific? If it’s not, I was hoping that I could modify his source code to work with these other devices.

    Any help will be much appreciated.

    best,
    JohnB

  70. JohnB
    September 30th, 2009 at 16:42 | #70

    @Brian
    @ME,

    I assume you could do this by having the Panic Button trigger a VBScript (.VBS) which plays a random sound file within a specific directory.

    I couldn’t find a suitable VBScript, but I did find this:

    http://theessentialexchange.com/blogs/michael/archive/2007/11/15/shuffle-play-your-audio-files-with-powershell.aspx

    It requires Microsoft PowerShell (similar to VBScript), and a simple open source audio player called MPlayer.

    I hope this helps.

  71. October 4th, 2009 at 18:32 | #71

    Hi John,

    This looks like exactly what I need, but it will not work on my button. it appears that ine is slightlty difefrent than the one you designed the sw for.

    The “test” function works fine, but when I press the button I just get the default Windows error sound. (bing)

    My device is here http://www.dreamcheeky.com/index.php?pagename=product&pid=11

    Can you help?

  72. John Bruin
    admin
    October 6th, 2009 at 13:26 | #72

    Hi John,
    No my software is not TenX-specific and I think is should be not too difficult to modify it for use with other panic buttons. If you have the product and vendor id’s of your button then you can use Jan Axelson’s Generic HID example to test what happens when you click the button.

  73. JohnB
    October 6th, 2009 at 14:18 | #73

    @admin
    Thanks for your reply, John. Yes, I know the VID/PID’s and I should be able to use Jan’s Generic HID or some other “USB sniffer” to figure out what happens on a button press.

    Would you be able to post or send me your source code so I can take a shot at modifying it?

    thanks again,
    JohnB

  74. John Bruin
    admin
    October 6th, 2009 at 15:47 | #74

    Today I have added the source code.

  75. JohnB
    October 6th, 2009 at 17:20 | #75

    @admin
    Thanks so much for posting the source, John. I’ll take a look at it and see if I can get it to work with those other gadgets.

  76. October 28th, 2009 at 19:04 | #76

    Is it possible to have three rigged in to a PC and have them perform different actions? I’m thinking gameshow buzzer style.

  77. John Bruin
    admin
    October 29th, 2009 at 13:35 | #77

    No I don’t think that is possible BUT I have also software ready to use the PlayStation Buzz controllers on your PC.

  78. November 2nd, 2009 at 13:50 | #78

    Oh well that sounds perfect. Where can I find more information?

  79. John Bruin
    admin
    November 2nd, 2009 at 16:16 | #79

    @Jonny I will make a post with that soon!

  80. Aaron
    November 4th, 2009 at 18:51 | #80

    Is there any way to have it take commands from two buttons?

  81. Thijss
    November 13th, 2009 at 17:09 | #81

    I can now startup my pc by pressing ctrl+alt+del on my keyboard.
    is it possible to startup my pc with this button if I set the command to Ctrl+Alt+Del?
    (don’t have the button (yet) so can’t test it)
    Thanks

  82. John Bruin
    admin
    November 13th, 2009 at 22:30 | #82

    No Thijs, I am sorry but you have to be logged in to make this work.

  83. Henk Jan
    November 19th, 2009 at 14:24 | #83

    Thijs, how did u get this to work…using CTRL-ALT-DEL and computer turns on.

    In theory somehow it should be possible to use the button to turn on PC, USB devices still have power when computer is off

  84. pepe2299
    December 6th, 2009 at 09:25 | #84

    Hi,
    does it also work for Windows 7?
    THX for help:)

  85. John Bruin
    admin
    December 10th, 2009 at 11:43 | #85

    @pepe2299
    Yes I can confirm that it works in 32bit Windows 7

  86. January 6th, 2010 at 21:04 | #86

    @Junky
    Can you post an alternate link (filehippo is good). Filefactory is pretty unreliable.

  87. alex
    January 16th, 2010 at 11:48 | #87

    Thanks. Worked as a charm on Win7.

  88. Steve
    January 19th, 2010 at 22:31 | #88

    Hi,
    this software bei John works damn good:)
    But how can I start a game like BATTLEFIELD 2 with the USb Panic Button?
    Can somebody please help me?
    THX a lot
    Steve

  89. Steve
    January 20th, 2010 at 22:48 | #89

    Hi,
    this site is great:)
    Can somebody please help me?
    Is there any chance to start a game liek BF2 with the USB Panic Button?
    THX all for helping me
    Steve

  90. February 4th, 2010 at 16:04 | #90

    Hey,

    I’ve got a similar usb button. It’s not the panic button but a similar button. I guess it’s using the same USB info since i have found this website using the info i’ve found in the Device manager :) . Í want the software to acces this button so i can try out those earthshake kind of stuff aswell. I did not buy the button so i got no software cd with it. Is there anyone able to help out? :)

    Cheers!

  91. basara
    February 22nd, 2010 at 10:28 | #91

    hi,
    i want to ask can it work in two panic buttons in one pc for different command?

  92. February 22nd, 2010 at 13:06 | #92

    Hi, no I am sorry my software only works with 1 button

  93. SMIDSY
    May 22nd, 2010 at 20:44 | #93

    Hi guys; cannot get this to work with Win 7 64 but… any chance of an update at some point?

  94. May 25th, 2010 at 18:00 | #94

    @

    admin

    Which file do you modify the vendor/device ID’s in? I’m either blind or dumb I can’t find where to modify it…

  95. tom@vienna
    July 21st, 2010 at 09:18 | #95

    John, this is incredible!
    I loved my panic button, but now it not only stylish – it is very useful and much more fun!
    THANKS!

  1. July 15th, 2009 at 06:05 | #1
  2. October 11th, 2009 at 21:00 | #2