突然失礼します。 以下のサーバーAにあるvbsを、JP1から起動しようとしていますが、うまく起動しないので、もし原因が分かる方がいたら、ご教授願いたいです。 起動しようとしているサーバーAの「test.vbs」は、簡単に言うと、PsExecを利用して、サーバーBの「hoge.bat」を実行する内容です。 ***test.vbs*** Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run "PsExec.exe サーバーBIPアドレス -u 実行ユーザ -p 実行ユーザーパスワード cmd" WshShell.AppActivate "cmd " WScript.Sleep 3000 WshShell.SendKeys "cd C:\" WshShell.SendKeys "{enter}" WshShell.SendKeys "hoge.bat" WshShell.SendKeys "{enter}" WScript.Sleep 10000 WshShell.AppActivate "cmd" WshShell.SendKeys "exit" WshShell.SendKeys "{enter}" ************************ 上記バッチを手動で実行するとうまくいくのですが、 JP1で起動しようとすると、うまくいきません。 そもそもPsExecが実行出来ていないかも。。。。 宜しくお願いします。
↧