I would like to call a cmd (let's call it x.cmd) on a remote server. The x.cmd will return a log file in a log folder. Problem is this log folder in x.cmd doesn't have an absolute path (just a relative path like log\ ) so if I do
wmic /node:server process call create "serverpath\x.cmd"
it will process x.cmd but save the log file into
system32 or somewhere I assume. If I add
cd /d %~dp0 into x.cmd then it works fine. Unfortunately I am not allowed to touch x.cmd. Just wondering is there any other way to call the x.cmd without modifying it and also the correct output. Thanks.