I have a server with a 'pub' folder, shared to everyone with read access. I want to deploy (push) a local file to the pub folder using a batch file for easy deployment. I have administrator rights on the server, but am not on the same workgroup, so I'll need to authenticate.
I can do this :
net use \\myserver\c$ mypass /user:myserver\administrator
copy c:\myfile.exe \\myserver\c$\pub
this does what I want, however, can't do the following which I'd prefer to use :
net use \\myserver\pub mypass /user:myserver\administrator
copy c:\myfile.exe \\myserver\pub
latter one gives an access denied error.