How can I generate a GUID in a batch file running using the commandline in Windows?
The Windows SDK comes with a tool called uuidgen
(if you have Visual Studio, you'll have the Windows SDK, and you need to run the Visual Studio Command Prompt to set proper paths).
C:\>uuidgen
This will output a new GUID, e.g.
cc23b318-156e-473f-aa6e-517bf091a0f0