If you have a running vbs-macro you could probably do everything what you like to do - an extra generation of an executable file might not be necessary. Even if you could create an appropriate txt-file, giving it an extension like bat/cmd/vbs. Nothing of it is specially related to Qlik and so you will get better and faster results in regard to examples and explanations within any vb/vbs/vba-forum.