1 |
; |
2 |
; TFTPD32 as service installer |
3 |
; Performs a silent install of TFTPD32 as service |
4 |
; Writes a uninstaller (normally extract it and disable this) |
5 |
; |
6 |
; Copyright Qzone 2007 |
7 |
; |
8 |
|
9 |
!include "serviceinst.nsi" |
10 |
OutFile "InstTFTP.exe" |
11 |
SilentInstall "silent" |
12 |
SilentUnInstall "silent" |
13 |
|
14 |
Section install |
15 |
|
16 |
;Create service |
17 |
!insertmacro SERVICE create TS_TFTP \ |
18 |
" path=$\"$EXEDIR\srvstart.exe$\" svc TS_TFTP -d 0 $\"$EXEDIR\tftpd32.exe$\";autostart=1;interact=0;disp=TS TFTP;machine=0;user=0;password=0;desc=AnywhereTS TFTP server;" |
19 |
|
20 |
;A bug in the service macro means description is not set. |
21 |
;This is a hack... |
22 |
#WriteRegStr HKLM \ |
23 |
#"SYSTEM\CurrentControlSet\Services\TS_TFTP" "Description" "AnywhereTS TFTP server" |
24 |
|
25 |
; WriteUninstaller "$EXEDIR\UninstTFTP.exe" |
26 |
|
27 |
SectionEnd |
28 |
|
29 |
Section Uninstall |
30 |
!undef UN |
31 |
!define UN un. |
32 |
!insertmacro SERVICE stop TS_TFTP "" |
33 |
!insertmacro SERVICE delete TS_TFTP "" |
34 |
SectionEnd |