What you actually want to script is this:
Quote:

GUIDGen does this by calling the CoCreateGuid application programming interface (API) function to generate a new GUID




This API is not part of GUIDGen - GUIDGen is just a wrapper exe to allow you to call the API.

If you search around for scripts which call coCreateGUID you should be able to find something that you can convert or use directly.

If not, post again.