2017-03-09 61 views
0

我正在爲Windows創建電子應用程序並使用一些Windows應用程序依賴關係。
其他依賴項需要一個文件路徑作爲變量。實施例
傳遞「文件內容」而不是「文件位置」

dependency.exe --config /path/to/config/file.conf 


我希望直接與內容

例如

dependency.exe --config $("configuration content") 


原因取代/path/to/config/file.conf?我不希望爲用戶創建配置文件並將其保存爲封閉源

+0

什麼'dependency.exe'? – mihai

+0

有很多。其中之一是openvpn。 – thepaandu

回答

0

我假設dependency.exe是您的應用程序。你可以把它從標準輸入讀取,然後使用type命令獲取配置文件的內容:

type file.conf | dependency.exe 
+0

內容在哪裏?我需要存儲文件嗎? – thepaandu

相關問題