Problem with Button in "MS-Dos Batch" Mode

You're calling GetFile(target) on Microsoft's FileSystemObject. GetFile returns a File object so I expect that won't work when the path (target) is a folder. You'd need to use GetFolder instead (or don't call either of those things and just build a list of path strings instead of a list of File/Folder objects).

msdn.microsoft.com/en-us/library ... 85%29.aspx

[quote]How to integrate the Script into the Buttoncode?
For now it needs to call "CreateShortcutTarget.vbs" which uses "dopusrt.exe" to do the Copy-job.
Integrating it in the Button means passing the Output of the Script to DOpus to do the copy.
How can I do that?[/quote]

You're already calling Opus via dopusrt.exe and you'll still have to do that even if the script is integrated into a button since there is (currently) no other way for VBScript to all Opus commands. (Opus commands can call VBScript but not currently the other way around, except via dopusrt.exe).

All integrating the script into a button will do (at least in current versions of Opus) is remove the need to store the script in a separate file. (See here.)