I have a program that uses psExec to extract environment variables on a remote host. I get the error message: PSEXESVC service failed to start when xxhost Access was accessed.
This command works for Windows 2003 servers, but not 2008 (it works in 2008 if I run CMD as another user): psexec \ xxhost -u xxdomain \ xxuser -p xxpasswrd-h cmd / c echo %% JAVA_HOME ^% %
I also tried creating a connection before running psexec (with NET USE) - above, this works in 2003, but not in 2008: NET USE \ XXhost psexec \ host cmd / c echo %% JAVA_HOME ^ %%
The problem is that I cannot use RUNAS in batch files as it asks for a password. So, does anyone know a workaround without having to make changes on the remote server?
source
share