blog@mcZen

Software, life, and leisure

GuidGen

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

June 13, 2007 7:30 AM

mike

I have several tools that I have used for years. One of my favorites is GuidGen. I wrote this several years back so that I could generate a mass quantity of GUIDs in Visual Studio. It really isn't fancy or spectacular, but it does the job its suppose to do. It copies a new GUID in a desired format to the clipboard. You could file it under one of those "PortableApps". I always end up droping it into the windows folder so I can just run it from the command line.

Download Now
Note: Creative Commons License 3.0 applies since I've include code and the binary.

usage: GuidGen.exe /[Z][B|D|N|P|E]
 Z: Zero Guid
   00000000-0000-0000-0000-000000000000
 D: 32 digits separated by hyphens (Default - No Parameters)
   xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
 B: 32 digits separated by hyphens, enclosed in brackets
   {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
 N: 32 digits
   xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 P: 32 digits separated by hyphens, enclosed in parentheses
   (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
 E: Base 64 Encoded Guid Byte Array

Z can be combined with any of the format types to produce the Empty GUID in the desired format.


Add to Visual Studio 2005 External Tools

Tools > External Tools...
[Click Button] Add
[Title] GuidGen
[Command] GuidGen.exe
[Arguments] From above, the default is "\D"
[Checkbox] Use Output Window
[Click Button] Move Up (to the top if adding keyboard shortcut)

Adding the Keyboard Shortcut
Tools > Customize > Keyboard (Button at bottom)
Show Commands Containing: "Tools.ExternalCommand1"
Assign Key ctrl~ (Ctrl-tilde)
[Click Button] Assign
[Click Button] Ok

Now when ever you need a GUID, press Ctrl-tilde to create a new one and ctrl-v to paste!

Powered by BlogEngine.NET 1.4.5.7