This repository was archived by the owner on Dec 25, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUninstallLog.nsh
62 lines (52 loc) · 1.59 KB
/
UninstallLog.nsh
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
;AddItem macro
!macro AddItem Path
FileWrite $UninstLog "${Path}$\r$\n"
!macroend
;File macro
!macro File FilePath FileName
IfFileExists "$OUTDIR\${FileName}" +2
FileWrite $UninstLog "$OUTDIR\${FileName}$\r$\n"
File "/oname=${Filename}" "${FilePath}${FileName}"
!macroend
;CreateShortcut macro
!macro CreateShortcut FilePath FilePointer Pamameters Icon IconIndex
FileWrite $UninstLog "${FilePath}$\r$\n"
CreateShortcut "${FilePath}" "${FilePointer}" "${Pamameters}" "${Icon}" "${IconIndex}"
!macroend
;Copy files macro
!macro CopyFiles SourcePath DestPath
IfFileExists "${DestPath}" +2
FileWrite $UninstLog "${DestPath}$\r$\n"
CopyFiles "${SourcePath}" "${DestPath}"
!macroend
;Rename macro
!macro Rename SourcePath DestPath
IfFileExists "${DestPath}" +2
FileWrite $UninstLog "${DestPath}$\r$\n"
Rename "${SourcePath}" "${DestPath}"
!macroend
;CreateDirectory macro
!macro CreateDirectory Path
CreateDirectory "${Path}"
FileWrite $UninstLog "${Path}$\r$\n"
!macroend
;SetOutPath macro
!macro SetOutPath Path
SetOutPath "${Path}"
FileWrite $UninstLog "${Path}$\r$\n"
!macroend
;WriteUninstaller macro
!macro WriteUninstaller Path
WriteUninstaller "${Path}"
FileWrite $UninstLog "${Path}$\r$\n"
!macroend
;WriteRegStr macro
!macro WriteRegStr RegRoot UnInstallPath Key Value
FileWrite $UninstLog "${RegRoot} ${UnInstallPath}$\r$\n"
WriteRegStr "${RegRoot}" "${UnInstallPath}" "${Key}" "${Value}"
!macroend
;WriteRegDWORD macro
!macro WriteRegDWORD RegRoot UnInstallPath Key Value
FileWrite $UninstLog "${RegRoot} ${UnInstallPath}$\r$\n"
WriteRegStr "${RegRoot}" "${UnInstallPath}" "${Key}" "${Value}"
!macroend