-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall_script.nsi
More file actions
57 lines (38 loc) · 1.56 KB
/
install_script.nsi
File metadata and controls
57 lines (38 loc) · 1.56 KB
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
Name "Anydrop Desktop"
# define name of installer
OutFile "AnyDrop-Windows Setup.exe"
# define installation directory
InstallDir $PROGRAMFILES\Anydrop-Desktop
DirText "Choose a directory to install Anydrop-Desktop in your system"
# For removing Start Menu shortcut in Windows 7
RequestExecutionLevel admin
# start default section
Section
# set the installation directory as the destination for the following actions
SetOutPath $INSTDIR
# Add Program Files
File Anydrop-Desktop.exe
File Anydrop-Desktop.iobj
File Anydrop-Desktop.ipdb
File Anydrop-Desktop.pdb
File flutter_windows.dll
File /r data
# create the uninstaller
WriteUninstaller "$INSTDIR\uninstall.exe"
# create a shortcut named "new shortcut" in the start menu programs directory
# point the new shortcut at the program uninstaller
CreateDirectory "$SMPROGRAMS\Anydrop-Desktop"
CreateShortCut "$SMPROGRAMS\Anydrop-Desktop\Uninstall Anydrop.lnk" "$INSTDIR\uninstall.exe"
CreateShortCut "$SMPROGRAMS\Anydrop-Desktop\Anydrop-Desktop.lnk" "$INSTDIR\Anydrop-Desktop.exe"
CreateShortCut "$DESKTOP\Anydrop-Desktop.lnk" "$INSTDIR\Anydrop-Desktop.exe"
SectionEnd
# uninstaller section start
Section "uninstall"
# first, delete the uninstaller
Delete "$INSTDIR\uninstall.exe"
RMDIR "$INSTDIR"
# second, remove the link from the start menu
Delete "$SMPROGRAMS\Anydrop-Desktop\Anydrop-Desktop.lnk"
RMDIR "$SMPROGRAMS\Anydrop-Desktop"
# uninstaller section end
SectionEnd