Here's one a couple years old that's mostly similar although it returns the value c/w the curly braces:
(defun CreateGUID ( / typelib result )
(setq
typelib (vlax-create-object "Scriptlet.TypeLib")
result (vlax-get typelib 'GUID)
)
(vlax-release-object typelib)
[color=green];; trim the trailing \000u artifact[/color]
(substr result 1 38)
)
(CreateGUID) => "{EF34336E-96C8-4309-AE53-E897435E84C9}"
My start-up routine performs a vl-load-com, ergo it's absence from the defun above.