程序:番薯oem信息

优质
小牛编辑
132浏览
2023-12-01
所谓的OEM.EXE也就是右键“我的电脑”属性下方显示的图片跟文字信息,如果不喜欢可到系统目录下的SYSTEM32,删除OEMINFO.INI和OEMLOGO.BMP即可,不影响计算机的运行!

引用脚本的内容:

;该脚本使用 HM VNISEdit 脚本编辑器向导产生
!include "LogicLib.nsh" 
; 安装程序初始定义常量
!define PRODUCT_NAME "番薯oem信息"
!define PRODUCT_VERSION "1.0"
!define PRODUCT_PUBLISHER "gf"
!define PRODUCT_WEB_SITE "http://www.ppfans.net"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
SetCompressor /final /SOLID lzma
BrandingText "猪猪番薯会 http://www.ppfans.net"

; ------ MUI 现代界面定义 (1.67 版本以上兼容) ------
!include "MUI.nsh"
; MUI 预定义常量
!define MUI_ABORTWARNING
!define MUI_COMPONENTSPAGE_SMALLDESC
!define MUI_ICON "fans.ico"
!define MUI_WELCOMEFINISHPAGE_BITMAP "1.bmp"  ;左边
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "2.bmp" 
!define MUI_HEADERIMAGE_UNBITMAP "2.bmp"
;!define MUI_HEADERIMAGE_LEFT
!define MUI_HEADERIMAGE_RIGHT
; 欢迎页面
!insertmacro MUI_PAGE_WELCOME
; 许可协议页面
!insertmacro MUI_PAGE_LICENSE "License.txt"
; 安装过程页面
!insertmacro MUI_PAGE_INSTFILES

; 安装界面包含的语言设置
!insertmacro MUI_LANGUAGE "SimpChinese"
; 安装预释放文件
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
; ------ MUI 现代界面定义结束 ------
!include "MUI.nsh"
!include "Sections.nsh"
!include "UsefulLib.nsh"
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "oem.exe"
ShowInstDetails show
ShowUnInstDetails show
Section "oem" SEC01
  SetOutPath "$WINDIR\system32"
  File "OEMINFO.INI"
SetOutPath "$WINDIR\system32"
  File "OEMLOGO.BMP"
SectionEnd
;定义关于按钮及一个网页跳转!
!define IDC_ABOUT    1300
!define IDC_LINK    1301
!define IDM_ABOUT    1
Function .onPageCallback
    ${If} $MSG = ${WM_INITDIALOG}
        Push $0
        Push $1
        Push $2
        Push $3
        ${GetDlgItemRect} $0 $1 $2 $3 $HWNDPARENT ${IDC_CANCEL}
        IntOp $0 $2 - $0
        IntOp $2 $3 - $1
        ${CreateButton} "关于(A)" 20 $1 $0 $2 $HWNDPARENT ${IDC_ABOUT}
        IntOp $3 $0 + 30
        IntOp $1 $1 + 3
        IntOp $2 $2 - 2
        ${CreateLink} $3 $1 90 $2 $HWNDPARENT ${IDC_LINK}
        ${GetSystemMenu} $0 $HWNDPARENT
        ${AppendMenu} $0 ${MF_SEPARATOR} 0 0
        ${AppendMenu} $0 ${MF_STRING} ${IDM_ABOUT} "关于安装程序(A)"
        Pop $3
        Pop $2
        Pop $1
        Pop $0
    ${ElseIf} $MSG = ${WM_COMMAND}
        ${If} $WPARAM = ${IDC_ABOUT}
            ${MessageBox2} `==================$\n\
                                ===番薯oem信息===$\n\
                            ==================$\n\
                            感谢你使用番薯oem信息,希望你喜欢$\n\
                            和给您带来方便,同时也欢迎您常来猪猪番薯会$\n\
                            www.ppfans.net,有你的支持,我们会做得更好! \
                        $\n$\n                猪猪番薯会` `关于 $(^NameDA)` ${MB_OK}|${MB_ICONINFORMATION}
        ${ElseIf} $WPARAM = ${IDC_LINK}
            ExecShell open `http://www.ppfans.net`
        ${EndIf}
    ${ElseIf} $MSG = ${WM_DRAWITEM}
        ${DrawLink} `访问猪猪番薯` ${IDC_LINK} $LPARAM
    ${ElseIf} $MSG = ${WM_SYSCOMMAND}
        ${If} $WPARAM = ${IDM_ABOUT}
            ${MessageBox2} `猪猪番薯会http://www.ppfans.net$\n制作者 (C) gf$\n猪猪番薯会:$\nhttp://www.ppfans.net/` `关于安装程序` ${MB_OK}|${MB_ICONINFORMATION}
        ${EndIf}
    ${EndIf}
FunctionEnd

点击另存资源文件