0
我想在編譯NSIS腳本之前運行批處理。NSIS - 編譯前運行批處理文件
我找到了execWait。這將啓動批處理文件,同時安裝我的應用程序。
我也試過了!execute'batch.bat'但是在編譯時出現錯誤。
這是我的批處理文件的內容:
@echo off
@type file.txt > destination.txt
@echo. >> destination.txt
@svnversion.exe >> destination.txt
1.更新
這就是我把我的NSI文件,但它不工作。
!tempfile BAT
!appendfile "${BAT}.cmd" "@echo off$\r$\n"
!appendfile "${BAT}.cmd" "@type file.txt > destination.txt$\r$\n"
!appendfile "${BAT}.cmd" "@echo. >> destination.txt$\r$\n"
!appendfile "${BAT}.cmd" "@svnversion.exe >> destination.txt$\r$\n"
!system '"${BAT}.cmd"'
!delfile "${BAT}.cmd"
!undef BAT
錯誤是「Cant't打開輸出文件」「錯誤 - 中止創作過程」
我做一些錯誤的源代碼?
確定。我刪除了'!delfile'這一行$ {BAT} .cmd「'並且工作正常!這樣謝謝 –