博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
NSIS安装包制作
阅读量:7258 次
发布时间:2019-06-29

本文共 1169 字,大约阅读时间需要 3 分钟。

6)闪屏界面,可以在源代码中加入下列代码即可:

A、普通效果

 

以下是代码片段:

Function .onInit
SetOutPath $TEMP
File /oname=spltmp.bmp "G:\Temp\Nsisres\splash.bmp"
splash::show 2300 $TEMP\spltmp
Pop $0
FunctionEnd

效果图如此软件下载:
B、渐隐闪屏

 

以下是代码片段:

Function .OnInit
InitPluginsDir
File /oname=$PLUGINSDIR\splash.bmp "G:\Temp\Nsisres\splash.bmp"
advsplash::show 1500 800 600 -1 $PLUGINSDIR\splash
Functionend

7)背景音乐[贯穿安装过程]

 

以下是代码片段:

Var hmci
Function .OnInit
InitPluginsDir
SetOutPath $PLUGINSDIR
File "G:\Temp\Nsisres\music.mp3"              [说明:源MP3的存放路径]
System::Call msvfw32.dll::MCIWndCreate(i 0, i 0,i 0x0070, t "$PLUGINSDIR\music.mp3") i .r0
SendMessage $0 0x0465 0 "STR:play repeat"
System::Call user32.dll::ShowWindow(i r0, i 0)
StrCpy $hmci $0
Functionend
Section
;add your codes
SendMessage $hmci 0x0010 0 0
Sectionend

后语:

 

NSIS文本操作

 

FileOpen $0 "$EXEDIR\a.txt" w

FileWrite $0 "360安全网"
FileWriteByte $0 "13"

FileWriteByte $0 "10"

 FileWrite $0 "www.hack59.com"

 FileClose $0

 

!include "TextFunc.nsh"

!include "WordFunc.nsh"

Section

  ;读取文本文件,写入文本文件,读取第一行到最后一行。
  ${LineFind} "xxx.ini" "xxx.ini" "1:-1" "Config"
SectionEnd

Function Config

  ${WordReplace} $R9 'PATH="值"' 'PATH="www.hack59.com替换成你想要的"' "+*" $R9
  Push $0
FunctionEnd

 

转载地址:http://wzvdm.baihongyu.com/

你可能感兴趣的文章
RHEL6基础之一系统内核Kernel与GNU计划及Linux发行版本
查看>>
网络问题真的很怪
查看>>
Calendar日历类和GregorianCalendar公历类用法的一个小结
查看>>
NoSQL -- php应用redis、mongodb
查看>>
Nginx 配置全解析(一)
查看>>
java中的URLEncoder和URLDecoder类的联系与区别
查看>>
我的友情链接
查看>>
Redis 连接池配置及redis操作
查看>>
MDT2012/13功能测试(1)—向MDT工作台添加资源
查看>>
NFS文件系统
查看>>
ExtJs的tab
查看>>
mysql安装
查看>>
pip笔记(译)
查看>>
python基础(七)——网络编程
查看>>
算法——二分搜索
查看>>
Ruby Code Style
查看>>
CSS3深度学习
查看>>
将rm删除的文件,放到回收站
查看>>
JSTL安装与使用
查看>>
winSocket编程(十)完成端口
查看>>