0

I have Encrypt.bat on \\RDWAPPserver which contains code to encrypt the file and upload it to FTP server by using 2 commandline parameters.

Encrypt.bat needs 2 commandline parameters exl: \\rdwtestserver\encrypt\file1.out and \\rdwtest1server\encrypt.txt

I need to run Encrypt.bat from \\RDWQAtestserver in such a way that Encrypt.bat will run on \\RDWAPPserver with commandline parameters

2
  • You need someone/something to run the script for you on that server. You cannot do this using just ftp. May 20, 2015 at 9:28
  • @ThomasDickey: I have all functionality in Encrypt.bat... is there any way to run this batch file with argument on RDWAPPserver from RDWQAtestserver ?
    – abhayk
    May 20, 2015 at 9:35

1 Answer 1

0

PsExec is probably what you're looking for.

https://technet.microsoft.com/en-us/sysinternals/bb897553.aspx

Usage: psexec [\computer[,computer2[,...] | @file]][-u user [-p psswd][-n s][-r servicename][-h][-l][-s|-e][-x][-i [session]][-c [-f|-v]][-w directory][-d][-][-a n,n,...] cmd [arguments]

2
  • is it possible without using psexec.exe?
    – abhayk
    May 20, 2015 at 13:10
  • 1
    Sure. The other method involves using WMIC, I.e.: C:\> wmic /node:[targetIPaddr] /user:[admin] process call create "cmd.exe /c [command]" Or you could call WMI functions from inside a VBScript as mentioned in 4sysops.com/archives/three-ways-to-run-remote-windows-commands/… The other options would be to install an external program to do this for you (OpenSSH/FreeSSHd/WinSSHd, or a commercial one like ControlUp)
    – Dee Eff
    May 20, 2015 at 13:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .