NSIS 自定义安装界面准确获取安装进度完美解决方案,nsis,安装进度条,精准获取进度条
admin | nsis | 2015-03-13
C++
几乎所有玩过nsis的人在制作安装进度页面时都会遇到一个比较棘手的问题,画出进度条容易,但准确掌握文件释放进度,同时再去配合进度条的进度在nsis看来几乎是个无法逾越的障碍,因为迄今为止NSIS尚无可直接使用的指令或者函数来获取相关数据。网络上解决这个问题大部分做法都是大约分为若干段,20%...40%...80%...100%这样大概... [阅读全文]
NSIS获取当前屏幕分辨率,nsis,分辨率,屏幕分辨率
admin | nsis | 2015-03-13
C++
OutFile "ScreenRes.exe"
Name "Get User Screen Resolution"
Caption "Get User Screen Resolution"
XPStyle "on"
Function ".onInit"
System::Call 'user32::GetSystemMetrics(i 0) i .r0'
System::Call 'user32::GetSystemMetrics(i 1) i .r1'
MessageBox MB_OK|MB_ICONINFORMATION "Screen Resolution: $\r$\n$... [阅读全文]
NSIS判断当前win操作系统,系统版本,win7系统
admin | nsis | 2015-03-13
C++
SetCompressor /SOLID lzma
XPStyle on
OutFile "判断当前win操作系统.EXE"
Name "判断当前win操作系统"
Section
ReadRegStr $1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "CurrentVersion"
StrCmp $1 "" +1 +2
ReadRegStr $1 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber
ReadRe... [阅读全文]
NSIS批量筛选DLL是否可以通过regsvr32注册
admin | nsis | 2015-03-13
C++
/*一个批量筛选DLL是否可以通过regsvr32注册的工具*/
!include "FileFunc.nsh"
!insertmacro Locate
OutFile "分选dll.EXE"
Name "分选dll"
Var Success
Var Failed
Section
FileOpen $Success "$EXEDIR\Success.TXT" A
FileOpen $Failed "$EXEDIR\Failed.txt" A
${Locate} "$EXEDIR" "/M=*.dll" "loc" ;可以... [阅读全文]
NSIS透明渐入渐出效果,nsis,透明效果,渐隐渐显
admin | nsis | 2015-03-13
C++
## transparent.nsi
##
## Script write by Restools & X-Star, Mod by zhfi.
## Needs the mod version of nsdialogs.dll or installoptions.dll plugin (suppert timer function)!
## Transparent Splash effect in NSIS while run/Exit installer, only effective on windows 2k or higher.
/*
## function u... [阅读全文]
NSIS获取文件版本信息,nsis,版本信息
admin | nsis | 2015-03-13
C++
!include "FileVerInfo.nsh"
Name "GetFileVerInfo"
Caption "$(^Name)"
OutFile "GetFileVerInfo.exe"
XPStyle on
Function .onGUIInit
StrCpy $0 "文件 $WINDIR\notepad.exe 的版本信息:$\r$\n"
${GetProductName} "$WINDIR\notepad.exe" $R0
StrCpy $0 "$0$\r$\n - 产品名称 (ProductName): $R0"
${Ge... [阅读全文]
NSIS在网上下载配置文件并运行相应程序,nsis,服务器配置文件,远程下载配置文件
admin | nsis | 2015-03-13
C++
OutFile "RandomPage.EXE"
Name "RandomPage"
!include "MUI2.nsh"
SetFont "tahoma" 8
Var NoNetwork
Var ID1
Var ID2
Var ID3
Var ID4
Var Dialog
Var Checkbox1
Var Checkbox2
Var Checkbox3
Var Checkbox4
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_COMPONENTS
Page custom RandomPageSho... [阅读全文]
NSIS拦截鼠标左键点击拖动界面,nsis,拦截消息,拦截鼠标消息
admin | nsis | 2015-03-13
C++
#拦截鼠标左键点击拖动界面
!include nsDialogs.nsh
Page custom nsDialogsPage
Name "Setlink"
OutFile "Setlink.exe"
XPStyle on
Function OnTimer
System::Call user32::GetKeyState(i1)i.r4
${If} $4 < 0
SendMessage $HWNDPARENT ${WM_SYSCOMMAND} 0xF011 0
${EndIf... [阅读全文]
NSIS枚举系统常用文件夹路径,nsis,枚举路径,遍历文件夹路径
admin | nsis | 2015-03-13
C++
OutFile "读取系统文件夹.exe"
Name "获取系统文件夹路径"
Caption "获取系统文件夹路径"
XPStyle "on"
/*'0x0' ;桌面路径
'0x2' ;开始菜单\程序
'0x5' ;我的文档路径
'0x6' ;收藏夹的路径
'0x7' ;启动路径
'0x8' ;最近的文档
'0x9' ;发送到文件夹路径
'0xB' ;开始菜单
'0xD' ;我的音乐
'0x10' ;桌面目录路径... [阅读全文]
NSIS使用ie尝试打开一个url,nsis,ie,打开url,打开网址
admin | nsis | 2015-03-13
C++
#使用ie尝试打开一个url
!include "LogicLib.nsh"
SetCompressor /SOLID lzma
SetCompress force
XPStyle on
OutFile "Test.exe"
!define VARIANT_TRUE -1
!define VT_ERROR 10
!define DISP_E_PARAMNOTFOUND 0x80020004
!define CLSCTX_LOCAL_SERVER 0x4
!define CLSID_InternetExplorer {0002DF01-0000-0000-C... [阅读全文]