This can be done using Microsoft Scripting Runtime library (SCRRUN.DLL)
.. either with VB, VBA or VLisp.
be warned though that some antivirus software has been known to warn the end user that a potential virus is running ... I imagine this is not the thing you will want your users to think.
The version I have built is for a client, and not sharable. A little research will provide an algorithm to suit you.