No no, you can go ahead and put your Wsh script into QTP itself.
Word of advice for you, in your Example above the line Set Controller = WScript.CreateObject("WSHController") wont work where QTP is concerned, you would use Set Controller = CreateObject("WSHController") instead (with the WScript. dropped off)
I personally just find it tidier to keep anything VB orientated in a library so I can use it in all scripts without re-coding it in each script.
I'm not a complete idiot - some parts are missing.