gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 22:35:40 26 4
gpt4 key购买 nike

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

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com