惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
Security Latest
Security Latest
Simon Willison's Weblog
Simon Willison's Weblog
O
OpenAI News
GbyAI
GbyAI
L
LINUX DO - 最新话题
A
Arctic Wolf
T
Tor Project blog
G
GRAHAM CLULEY
I
InfoQ
博客园_首页
IT之家
IT之家
The Register - Security
The Register - Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
K
Kaspersky official blog
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
U
Unit 42
PCI Perspectives
PCI Perspectives
量子位
P
Palo Alto Networks Blog
S
Securelist
T
Troy Hunt's Blog
博客园 - 【当耐特】
Recorded Future
Recorded Future
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
Engineering at Meta
Engineering at Meta
T
The Blog of Author Tim Ferriss
博客园 - 聂微东
罗磊的独立博客
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
NISL@THU
NISL@THU
C
Cisco Blogs
T
Threatpost
有赞技术团队
有赞技术团队
Forbes - Security
Forbes - Security
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
T
The Exploit Database - CXSecurity.com
Cloudbric
Cloudbric
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
C
Cyber Attacks, Cyber Crime and Cyber Security

博客园 - 凌寒飘香

jquery getJSON bat 结束进程 mysql 行转列 ASP.NET连接Oracle数据库的步骤详解(转) mysql event mysql安装出现error Nr.1045 (转) windows服务(installutil.exe)报错。异常来自 HRESULT:0x80131515 bat,copy 文件 js ,String.format gridview模板页面调用js函数 执行带out参数的存储过程sql 无线网络配置 readexcel jquery.validate.min.js 打印配置 无线路由设置 pmi id 查询 天龙八部,小师妹,李沧海,齐御风 Windows Server 2008开机取消必须输入密码登录系统,不要按CTRL+ALT+DEL”,
NSIS堆栈 Push,Pop用法详解(转)
凌寒飘香 · 2013-04-01 · via 博客园 - 凌寒飘香

/*
编写:Ansifa
NSIS除了提供了变量$0~$9,$r0~$r9来存放文字外,还有堆栈,
而通过Push和Pop这两个堆栈操作可以将一些数字或字符暂时存放到堆栈里面
下面是一个简单例子:

实现功能是保护某个变量的值
*/
SetCompressor /SOLID lzma
SetCompress force
XPStyle on
OutFile "aaa.EXE"
Name "aaa"
Section

StrCpy $0 10    ;将10赋给$0
MessageBox MB_OK '"$0-这是赋值得到的"'

Push $0            ;将10压入堆栈

StrCpy $0 5
MessageBox MB_OK '"$0-此时的值是"StrCpy $0 5"赋值得到的,刚才的存在变量$0的10已经覆盖了"'

Pop $0            ;将堆栈的数(刚才压进的10)弹出到$0

MessageBox MB_OK '"$0-这是堆栈弹出的"'

SectionEnd

/*
好,例子看完了,问什么说保护变量的值呢?
本来$0值是一个数X,X未知,设为原始状态,

不过某个时刻因为变量不够用,或者其他原因想使用$0这个变量,
但是$0的X或许以后还要使用,所以在开始使用$0前,将$0用Push $0放入堆栈
使用完后Pop $0,那样就能做到$0使用前后不变了

$0='aaaa' ----这是原始态
........    ----中间代码


Push $0    ----开始使用$0,将要改变他的值
StrCpy $0 5     ---现在改变了$0,如果没有PushPop,以前的'aaaa'就肯定会找不回来了
........    ----中间代码
Pop $0    ----使用完$0,还原他本来值


此时的$0就像没有上面的暂时调用一样.仍然延续原始态
MessageBox MB_OK '$0' ----显示'aaaa'

........    ----中间代码*/