Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
CipherTalk/installer.nsh at main · robindiy/CipherTalk · GitHub
Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
robindiy
CipherTalk
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
CipherTalk
/
installer.nsh
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
64 lines (56 loc) · 2.44 KB
main
Breadcrumbs
CipherTalk
/
installer.nsh
Copy path
Top
File metadata and controls
Code
Blame
64 lines (56 loc) · 2.44 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
;
高 DPI 支持
ManifestDPIAware
true
!include
"
WordFunc.nsh
"
!macro
customInit
;
设置 DPI 感知
System::Call
'
USER32::SetProcessDPIAware()
'
!macroend
;
在安装开始前修正安装目录
!macro
preInit
;
如果安装目录不以 CipherTalk 结尾,自动追加
${WordFind}
"
$INSTDIR
"
"
\
"
"
-1
"
$R0
${If}
$R0
!=
"
CipherTalk
"
StrCpy
$INSTDIR
"
$INSTDIR\CipherTalk
"
${EndIf}
!macroend
;
安装完成后检测并安装 VC++ Redistributable
!macro
customInstall
IfSilent
skipVC
;
如果是静默安装(外壳调用),则跳过内部检查,避免MessageBox阻塞
;
检查 VC++ 2015-2022 x64 是否已安装
ReadRegStr
$0
HKLM
"
SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64
"
"
Installed
"
${If}
$0
!=
"
1
"
;
未安装,显示提示并下载
MessageBox
MB_YESNO
|
MB_ICONQUESTION
"
检测到系统缺少 Visual C++ 运行库,这可能导致程序无法正常运行。
$\n$\n
是否立即下载并安装?(约 24MB)
"
IDYES
downloadVC
IDNO
skipVC
downloadVC:
DetailPrint
"
正在下载 Visual C++ Redistributable...
"
SetOutPath
"
$TEMP
"
;
从微软官方下载 VC++ Redistributable x64
inetc::get
/TIMEOUT
=
30000
/CAPTION
"
下载 Visual C++ 运行库
"
/BANNER
"
正在下载,请稍候...
"
\
"
https://aka.ms/vs/17/release/vc_redist.x64.exe
"
"
$TEMP\vc_redist.x64.exe
"
/END
Pop
$0
${If}
$0
==
"
OK
"
DetailPrint
"
下载完成,正在安装...
"
;
使用 ShellExecute 以管理员权限运行
ExecShell
"
runas
"
'
"$TEMP\vc_redist.x64.exe"
'
"
/install /quiet /norestart
"
SW_HIDE
;
等待安装完成
Sleep
5000
;
检查是否安装成功
ReadRegStr
$1
HKLM
"
SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64
"
"
Installed
"
${If}
$1
==
"
1
"
DetailPrint
"
Visual C++ Redistributable 安装成功
"
MessageBox
MB_OK
|
MB_ICONINFORMATION
"
Visual C++ 运行库安装成功!
"
${Else}
MessageBox
MB_OK
|
MB_ICONEXCLAMATION
"
Visual C++ 运行库安装失败,您可能需要手动安装。
"
${EndIf}
Delete
"
$TEMP\vc_redist.x64.exe
"
${Else}
MessageBox
MB_OK
|
MB_ICONEXCLAMATION
"
下载失败:$0
$\n$\n
您可以稍后手动下载安装 Visual C++ Redistributable。
"
${EndIf}
Goto
doneVC
skipVC:
DetailPrint
"
用户跳过 Visual C++ Redistributable 安装
"
doneVC:
${Else}
DetailPrint
"
Visual C++ Redistributable 已安装
"
${EndIf}
!macroend
You can’t perform that action at this time.