This routine works for us to authenticate and copy to Windows machines -
<exec executable="net"> <arg line="use \\${deployment.server}\c$ /user:${deployment.server}\${login.id} ${login.password}"/> </exec> <delete dir="\\${deployment.server}/c$/auto-deploy"/> <copy todir="\\${deployment.server}/c$/auto-deploy"> <fileset dir="${target.dir}"> <include name="**"/> </fileset> </copy> SKent x8014 -----Original Message----- From: Ludwig, Michael [mailto:michael.lud...@delphi-mb.de] Sent: Wednesday, November 03, 2010 12:15 PM To: Ant Users List Subject: Windows authentication I want to deploy stuff to a server accessible only by its UNC path supplying a username and password. This is usually done using Windows Explorer. I think this is called Windows Authentication, or NTLM, or both - not sure. What are my options using Java? Specifically, using Ant? The clients I want to run my Ant script from are also Windows. So far, I've found the following: http://jcifs.samba.org/ http://www.luigidragone.com/networking/ntlm.html - from 2002 I'm not at all sure any of it is appropriate, so I'm looking for advice. My current solution uses Explorer to handle authentication: <property name="share" value="\\192.168.111.222\bla"/> <exec executable="explorer"> <arg value="${share}"/> </exec> <input message="Anmeldung an ${share} klar? Dann ENTER druecken!"/> <copy file="test.txt" todir="${share}"/> This requires a Windows OS and a user. There might be something better. -- Michael Ludwig _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. _____________