batch file help

Associate
Joined
28 Aug 2003
Posts
1,247
Location
N Ireland
it is a little complicated
i want to make a bat file to run a cmd on a remote machine to update my media library.
i can do it manually using psexec from pstools, but have got lost trying to automate it

i need to things in this order (win7 machine locally, whs2011 remote machine)

get an elevated command prompt [on win7 machine]
change directory to c:\pstools [folder where psexec.exe is]
run psexec \\vail -u Administrator -p ******** C:\YAMJ\My_YAMJ_2libraries_combined.cmd [where vail is the remote pc and YAMJ is the folder containing the command to run]

thanks for any ideas
 
update - worked a treat

any ideas on code to automatically elevate it to a 'run as administrator' command prompt?
(it doesn't connect remotely unless it is run from an elevated command prompt and i want to run it as a scheduled task, rather than doing it manually each time)
 
Back
Top Bottom