http://bugs.winehq.org/show_bug.cgi?id=21382
--- Comment #1 from Dan Kegel dank@kegel.com 2010-01-15 17:07:19 --- Created an attachment (id=25746) --> (http://bugs.winehq.org/attachment.cgi?id=25746) First try at a fix
Here's a simple patch that seems to make ~dp0 behave. Only lightly tested.