-
Notifications
You must be signed in to change notification settings - Fork 13
/
Kill.nsh
71 lines (66 loc) · 1.69 KB
/
Kill.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
63
64
65
66
67
68
69
70
71
!ifndef KILL_FUNCTIONS_NSH
!define KILL_FUNCTIONS_NSH
; Kill litestep if found
Function KillLS
Pop $R1
Push $R2
FindProcDLL::FindProc "litestep.exe"
StrCmp $R0 1 foundls lsnotfound
foundls:
Sleep 50
Exec "$R1\litestep.exe !quit" ; Be nice when shutting down
Sleep 2000
FindProcDLL::FindProc "litestep.exe"
Sleep 50
StrCpy $R2 "LSKilled"
StrCmp $R0 1 +1 end
Sleep 50
KillProcDLL::KillProc "litestep.exe"
Sleep 2000
FindProcDLL::FindProc "litestep.exe"
Sleep 50
StrCmp $R0 1 +1 end
MessageBox MB_OK $(MB_FOUND_LS_UNINST)
GoTo end
lsnotfound:
StrCpy $R2 "NoLS"
end:
Exch $R2
FunctionEnd
Function un.KillLS ; For the uninstaller
Pop $R1
FindProcDLL::FindProc "litestep.exe"
StrCmp $R0 1 foundls lsnotfound
foundls:
Sleep 50
Exec "$R1\litestep.exe !quit" ; Be nice when shutting down
Sleep 2000
FindProcDLL::FindProc "litestep.exe"
Sleep 50
StrCmp $R0 1 +1 lsnotfound
Sleep 50
KillProcDLL::KillProc "litestep.exe"
Sleep 2000
FindProcDLL::FindProc "litestep.exe"
Sleep 50
StrCmp $R0 1 +1 lsnotfound
MessageBox MB_OK $(MB_FOUND_LS_UNINST)
lsnotfound:
FunctionEnd
Function un.KillExplorer ; For the uninstaller
Pop $R1
FindProcDLL::FindProc "explorer.exe"
${If} $R0 == 1
Sleep 50
KillProcDLL::KillProc "explorer.exe"
Sleep 2000
FindProcDLL::FindProc "explorer.exe"
Sleep 50
${If} $R0 == 1
Sleep 50
KillProcDLL::KillProc "explorer.exe"
Sleep 50
${EndIf}
${EndIf}
FunctionEnd
!endif