杉宫竹苑工作室

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 2087|回复: 0

NSIS 创建用户

[复制链接]
发表于 2017-2-26 11:37:14 | 显示全部楼层 |阅读模式

正式会员享受无限制浏览网站功能和高速网盘下载,赶快加入本站吧!

您需要 登录 才可以下载或查看,没有账号?立即注册

x
  1. !include "MUI.nsh"

  2. !define MUI_ICON "F:\常用软件\绿色软件\N Edit06\ico\Favorites.ico"

  3. Page custom tywh
  4. Page instfiles


  5. !insertmacro MUI_LANGUAGE "SimpChinese"
  6. OutFile "实验.exe"
  7. ShowInstDetails nevershow
  8. BrandingText "天涯无痕作品"

  9. Section
  10. nsExec::ExecToLog "net user $R0 $R1 /add"
  11. nsExec::ExecToLog "net localgroup Administrators $R0 /add"
  12. nsExec::ExecToLog "net accounts /maxpwage:unlimited"
  13. SectionEnd

  14. Function .onInit
  15. InitPluginsDir
  16. File /oname=$PLUGINSDIR\test.ini "实验.ini"
  17. FunctionEnd

  18. Function tywh
  19. InstallOptions::dialog "$PLUGINSDIR\test.ini"
  20. !insertmacro MUI_INSTALLOPTIONS_READ $R0 "test.ini" "Field 2" "State"
  21. !insertmacro MUI_INSTALLOPTIONS_READ $R1 "test.ini" "Field 3" "State"
  22. FunctionEnd
复制代码

  1. [Settings]
  2. NumFields=3

  3. [Field 1]
  4. Type=Label
  5. Left=10
  6. Right=-40
  7. Top=10
  8. Bottom=18
  9. Text=请输入您想建立的系统用户名和密码

  10. [Field 2]
  11. Type=Text
  12. Left=20
  13. Right=-40
  14. Top=85
  15. Bottom=98
  16. State=请在此框内输入您想使用的计算机管理员名称

  17. [Field 3]
  18. Type=Text
  19. Left=20
  20. Right=-40
  21. Top=105
  22. Bottom=118
  23. State=请在此框内输入您想使用的计算机管理员密码
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|SgzyStudio

GMT+8, 2024-5-19 15:26 , Processed in 0.120759 second(s), 22 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表