Outfile "NSISTest.exe"
RequestExecutionLevel user
Installdir "$exedir"
Showinstdetails show
!include LogicLib.nsh
Page InstFiles
!define XMLFILE "$instdirmyxml.xml"
Section
StrCpy $9 "不存在"
nsisXML::create
nsisXML::load "${XMLFILE}"
${If} $0 = 0
;创建一个新XML文件
nsisXML::create
nsisXML::createProcessingInstruction "xml" 'version="1.0" encoding="UTF-8" standalone="yes"'
nsisXML::appendChild
nsisXML::release $2
${EndIf}
nsisXML::select '/choise'
${If} $2 = 0
StrCpy $1 $0
nsisXML::createElement "choise"
nsisXML::appendChild
${Else}
nsisXML::getText
StrCpy $9 $3
${EndIf}
DetailPrint "旧值: $9"
System::Call 'kernel32::GetTickCount()i.r5' ;获取一些“随机”的值
nsisXML::setText "$5"
nsisXML::release $2
nsisXML::save "${XMLFILE}"
nsisXML::release $0
DetailPrint "保存新值: $5"
SectionEnd
© 版权声明
THE END
暂无评论内容