Run WinSCP script From bat file as different user
Hi, could anybody help me with this please:
I can successfully call a WinSCP script from a bat file like this:
I can also successfully open a program such as notepad as a different user like this:
However I cannot call a WinSCP script as a different user by doing this:
When I run the code, it does nothing. It doesn't prompt for a password, open WinSCP or run the script. If I add a pause at the end to see what is on the cmd screen it is a list of prompts and their descriptions for the runas command.
Many thanks in advance.
James
I can successfully call a WinSCP script from a bat file like this:
"C:\Program Files (x86)\WinSCP\WinSCP.com" /script="script_file_path.txt"
runas /user:my_user@my_domain "C:\Windows\notepad.exe"
runas /user:my_user@my_domain "C:\Program Files (x86)\WinSCP\WinSCP.com" /script="script_file_path.txt"
Many thanks in advance.
James