-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathcleaner.nsi
More file actions
56 lines (48 loc) · 1.86 KB
/
Copy pathcleaner.nsi
File metadata and controls
56 lines (48 loc) · 1.86 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
# Included files
!include MUI2.nsh
!include InstallOptions.nsh
;--------------------------------
;Defines
!include "MUI2.nsh"
!include "Registry.nsh"
!include "Sections.nsh"
Name "Uganda EMR Backup"
!define MUI_ICON "software/favicon.ico"
!define MUI_UNICON "software/favicon.ico"
Var SMDir ;Start menu folder
;!define MUI_STARTMENUPAGE_DEFAULTFOLDER "MY Program" ;Default, name is used if not defined
!insertmacro MUI_PAGE_INSTFILES
!define MUI_HEADERIMAGE_BITMAP "software\logo.bmp"
!define MUI_HEADERIMAGE_RIGHT
RequestExecutionLevel admin
OutFile "includes\scripts\cleaner.exe"
CRCCheck on
XPStyle on
;Remove previous settings
Section -defaultProperties
DetailPrint 'Stopping Tomcat'
nsExec::Exec 'net stop UgandaEMRTomcat' $0
DetailPrint 'Tomcat Stopped $0'
RMDir /r 'C:\Program Files\UgandaEMR\UgandaEMRTomcat\webapps\openmrs'
RMDir /r 'C:\Program Files\UgandaEMR\UgandaEMRTomcat\temp'
CreateDirectory 'C:\Program Files\UgandaEMR\UgandaEMRTomcat\temp'
RMDir /r 'C:\Program Files\UgandaEMR\UgandaEMRTomcat\work\Catalina\localhost'
RMDir /r 'C:\Application Data\OpenMRS\.openmrs-lib-cache'
RMDir /r 'C:\Application Data\OpenMRS\activemq-data'
RMDir /r 'C:\Application Data\OpenMRS\chartsearch'
RMDir /r 'C:\Application Data\OpenMRS\lucene'
SectionEnd
Section -defaultProperties32
RMDir /r 'C:\Windows\System32\config\systemprofile\Application Data\OpenMRS\.openmrs-lib-cache'
RMDir /r 'C:\Windows\System32\config\systemprofile\Application Data\OpenMRS\activemq-data'
RMDir /r 'C:\Windows\System32\config\systemprofile\Application Data\OpenMRS\chartsearch'
RMDir /r 'C:\Windows\System32\config\systemprofile\Application Data\OpenMRS\lucene'
SectionEnd
;Restore war file in UgandaEMR
Section 'Start Tomcat' SecStartTomcat
SectionIn RO
DetailPrint 'Starting Tomcat $0'
nsExec::Exec 'net start UgandaEMRTomcat'
DetailPrint 'Tomcat Started $0'
Quit
SectionEnd