forked from realXtend/tundra
-
Notifications
You must be signed in to change notification settings - Fork 1
/
viewer-installer.nsi
62 lines (44 loc) · 1.8 KB
/
viewer-installer.nsi
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
!define VERSION "0.2.5"
Name "Naali ${VERSION}"
Page directory
Page instfiles
InstallDir "$PROGRAMFILES\Naali${VERSION}"
VIProductVersion "${VERSION}"
OutFile "Naali-0.2.5.exe"
XPStyle on
RequestExecutionLevel admin
Section ""
SetOutPath $INSTDIR
File /r build\*.*
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Naali" \
"DisplayName" "Naali"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Naali" \
"DisplayVersion" "${VERSION}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Naali" \
"UninstallString" "$INSTDIR\uninstaller.exe"
ExecWait '"$INSTDIR\oalinst.exe"'
ExecWait '"$INSTDIR\vcredist_x86.exe" /q'
ExecWait '"$INSTDIR\dxwebsetup.exe"'
WriteUninstaller "$INSTDIR\uninstaller.exe"
Delete "$INSTDIR\vcredist_x86.exe"
Delete "$INSTDIR\oalinst.exe"
Delete "$INSTDIR\dxwebsetup.exe"
SectionEnd
Section "Start Menu Shortcuts"
SetShellVarContext all
CreateDirectory "$SMPROGRAMS\Naali ${VERSION}"
CreateShortCut "$SMPROGRAMS\Naali ${VERSION}\Naali ${VERSION}.lnk" "$INSTDIR\viewer.exe"
CreateShortCut "$SMPROGRAMS\Naali ${VERSION}\Readme.lnk" "$INSTDIR\readme.txt"
CreateShortCut "$SMPROGRAMS\Naali ${VERSION}\Uninstall.lnk" "$INSTDIR\uninstaller.exe"
SectionEnd
Section "Uninstall"
RMDir /r $INSTDIR
#removing the APPDATA\roaming\realxtend doesn't seem to work properly on Vista. (maybe incorrect user information is given through add/remove programs)
SetShellVarContext all
RMDir /r "$APPDATA\Roaming\realXtend"
RMDir /r "$SMPROGRAMS\Naali ${VERSION}"
SetShellVarContext current
RMDir /r "$APPDATA\Roaming\realXtend"
RMDir /r "$SMPROGRAMS\Naali ${VERSION}"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Naali"
SectionEnd