在我的安装程序中,我想创建一个空文件。在 linux 中,我会使用 touch 命令,但是在 NSIS 中最简单的方法是什么?
最佳答案
#Compile time
!appendfile "$%temp%\compiletimefile.txt" ""
;Or if you need to force the file to be empty
!appendfile "$%temp%\compiletimefile.txt" ""
!delfile "$%temp%\compiletimefile.txt"
!appendfile "$%temp%\compiletimefile.txt" ""
#Run time, method 1
FileOpen $0 "$temp\runtimefile1.txt" w
FileClose $0
#Run time, method 2
File "/oname=$temp\runtimefile2.txt" "$%temp%\compiletimefile.txt"
关于nsis - 如何使用 NSIS 创建空文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7315992/