簡體   English   中英

使用 powershell 腳本運行 .exe 文件

[英]Running .exe file using powershell script

我在powershell腳本下運行:它有.exe文件可以通過獲取輸入文件並寫入輸出文件來運行。 但是,我在執行腳本時沒有看到輸出文件被寫入任何內容。

輸入文件包含將由 srvrmgr.exe 文件執行的查詢列表

#Input File $InputFile = "C:\\Siebel\\SiebelInput.txt"

#輸出文件 $OutputFile = "C:\\Siebel\\siebelOutput.txt"

#command Siebel $BatchFileCommand = "C:\\Siebel\\siebsrvr\\BIN\\srvrmgr.exe /g SblGateway /e ENT_17 /u SADMIN /p xxxx /i $InputFile /o $OutputFile"

如果這里缺少什么,你能幫我嗎?

謝謝

您的最后一個命令只是將字符串分配給變量$batchFileCommand 嘗試這樣的事情:

& "C:\Siebel\siebsrvr\BIN\srvrmgr.exe" /g SblGateway /e ENT_17 /u SADMIN /p xxxx /i $InputFile /o $OutputFile

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM