nsis - 如何使用 NSIS 创建空文件

标签 nsis

在我的安装程序中,我想创建一个空文件。在 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/

相关文章:

nsis - 更改NSIS安装程序属性

nsis - 使用 NSIS 创建快捷方式

NSIS 无人值守选项

nsis - 如何检查 NSIS 中是否选择了组件?

installation - 如何等待卸载程序完成?

sql - 如何从命令行输入 SQL 查询,并以更简单的格式检索输出

NSIS - 删除除一个文件之外的所有文件

installation - nsis 安装程序自动退出/关闭,我正在使用 pre 和 show 函数来显示目录 MUI 页面

nsis - NSIS 如何自动设置部分的大小要求?

nsis - 如何更改安装程序中的欢迎页面图像?