-
Notifications
You must be signed in to change notification settings - Fork 0
/
lmc.nsi
57 lines (39 loc) · 1.41 KB
/
lmc.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
Name "Little Man Computer"
OutFile "lmc-2.0.1-installer.exe"
InstallDir $PROGRAMFILES\lmc
DirText "This will install the Little Man Computer virtual machine and assembler on your computer. Choose a directory..."
RequestExecutionLevel user
LicenseText "ISC"
LicenseData COPYING
Section ""
SetOutPath $INSTDIR
File COPYING
File as/lmas.exe
File vm/lmvm.exe
CreateDirectory "$SMPROGRAMS\lmc"
CreateShortCut "$SMPROGRAMS\lmc\lmas.exe.lnk" "$INSTDIR\lmas.exe"
CreateShortCut "$SMPROGRAMS\lmc\lmvm.exe.lnk" "$INSTDIR\lmvm.exe"
CreateShortCut "$SMPROGRAMS\lmc\uninstall.exe.lnk" "$INSTDIR\uninstall.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\lmc" \
"DisplayName" \
"Litte Man Computer (remove only)"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\lmc" \
"UninstallString" \
"$INSTDIR\uninstall.exe"
WriteUninstaller $INSTDIR\uninstall.exe
MessageBox MB_OK "Installation was successful."
SectionEnd
Section "Uninstall"
Delete $INSTDIR\COPYING
Delete $INSTDIR\lmas.exe
Delete $INSTDIR\lmvm.exe
Delete $INSTDIR\uninstall.exe
RMDir $INSTDIR
Delete "$SMPROGRAMS\lmc\lmas.exe.lnk"
Delete "$SMPROGRAMS\lmc\lmvm.exe.lnk"
Delete "$SMPROGRAMS\lmc\uninstall.exe.lnk"
RMDir "$SMPROGRAMS\lmc"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\lmc"
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\lmc"
MessageBox MB_OK "Uninstall was successful."
SectionEnd