NSIS驱动安装插件脚本,nsis,设备驱动

作者: admin 分类: nsis 发布时间: 2015-03-13 12:51 ė1,850 浏览数 6没有评论
文章转自王牌软件
站长推荐:NSetup一键部署软件
一键式完成美化安装包制作,自动增量升级,数据统计,数字签名。应对各种复杂场景,脚本模块化拆分,常规复杂的脚本代码,图形化设置。无需专业的研发经验,轻松完成项目部署。(www.nsetup.cn)

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
!AddPluginDir .
Name "InstDrv.dll test"
OutFile "InstDrv-Test.exe"
ShowInstDetails show
ComponentText "InstDrv Plugin Usage Example"
Page components
Page instfiles
Section "Install a Driver" InstDriver
    InstDrv::InitDriverSetup /NOUNLOAD "{4d36e978-e325-11ce-bfc1-08002be10318}" "IrCOMM2k"
    Pop $0
    DetailPrint "InitDriverSetup: $0"
    InstDrv::DeleteOemInfFiles /NOUNLOAD
    Pop $0
    DetailPrint "DeleteOemInfFiles: $0"
    StrCmp $0 "00000000" PrintInfNames ContInst1
  PrintInfNames:
    Pop $0
    DetailPrint "Deleted $0"
    Pop $0
    DetailPrint "Deleted $0"
  ContInst1:
    InstDrv::CreateDevice /NOUNLOAD
    Pop $0
    DetailPrint "CreateDevice: $0"
    SetOutPath $TEMP
    File "ircomm2k.inf"
    File "ircomm2k.sys"
    InstDrv::InstallDriver /NOUNLOAD "$TEMP\ircomm2k.inf"
    Pop $0
    DetailPrint "InstallDriver: $0"
    StrCmp $0 "00000000" PrintReboot ContInst2
  PrintReboot:
    Pop $0
    DetailPrint "Reboot: $0"
  ContInst2:
    InstDrv::CountDevices
    Pop $0
    DetailPrint "CountDevices: $0"
SectionEnd
Section "Uninstall the driver again" UninstDriver
    InstDrv::InitDriverSetup /NOUNLOAD "{4d36e978-e325-11ce-bfc1-08002be10318}" "IrCOMM2k"
    Pop $0
    DetailPrint "InitDriverSetup: $0"
    InstDrv::DeleteOemInfFiles /NOUNLOAD
    Pop $0
    DetailPrint "DeleteOemInfFiles: $0"
    StrCmp $0 "00000000" PrintInfNames ContUninst1
  PrintInfNames:
    Pop $0
    DetailPrint "Deleted $0"
    Pop $0
    DetailPrint "Deleted $0"
  ContUninst1:
    InstDrv::RemoveAllDevices
    Pop $0
    DetailPrint "RemoveAllDevices: $0"
    StrCmp $0 "00000000" PrintReboot ContUninst2
  PrintReboot:
    Pop $0
    DetailPrint "Reboot: $0"
  ContUninst2:
    Delete "$SYSDIR\system32\ircomm2k.sys"
SectionEnd


只回答业务咨询点击这里给我发消息 点击这里给我发消息

王牌软件,兼职软件设计,软件修改,毕业设计。

本文出自 王牌软件,转载时请注明出处及相应链接。

本文永久链接: http://www.softwareace.cn/?p=1236

0

发表评论

电子邮件地址不会被公开。 必填项已用*标注

您可以使用这些HTML标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">


Ɣ回顶部

无觅相关文章插件,快速提升流量