net use x: \\target\c$ password /user:UserNameHere
That maps a network drive x on your machine to the target's c drive
password and UserNameHere are the username and password for the targets admin account
then use xcopy from the source to the x: drive
then run those files, delete, done
I work in IT in a large enterprise and we use UltraVNC to remote to computers. VNC has a batchfile that installs the VNC server on the remote host. However, it uses your credentials to log into the other computer. The problem is, we run thin clients off domain and so it tries to run the installation using domain\myname instead of localhost\admin. I want to write a new batchfile that will do it for me. I am using psexec to run the install but in order to get this to work I have to copy the files over manually and that isn't very batchy. So, does anyone know how to run xcopy across two machines that have different admin accounts? If I use the admin account on the target, my computer denies xcopy and if I use the admin account on my computer, the remote host denies xcopy. I'm very experienced in batching but I am mega stumped on this one. Any ideas?
runas /noprofile /user:adminstrator "xcopy \\me\c$\text.txt \\remote\c$\text.txt" does not work becasue my computer is the admin and the other computer rejects it, doing remote\administrator makes my computer deny it. I hope this is enough detail. Psexec would work except the second it is down exiting it deletes whatever it copied which doesn't work because I have to copy 4 files, execute 2 and then delete them. Neglect cross-platform versions, it's CLI people.