mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 14:57:20 +00:00
[host] nsis: log more details about the process
Uses nsExec:ExecToLog in a few places to log on the installation output window
This commit is contained in:
parent
fabb5bd4a9
commit
d01d9db9bf
@ -109,10 +109,23 @@ Function .onInit
|
|||||||
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
|
!macro StopLookingGlassService
|
||||||
|
;Attempt to stop existing LG service only if it exists
|
||||||
|
|
||||||
|
nsExec::Exec 'sc.exe query "Looking Glass (host)"'
|
||||||
|
Pop $0 ; SC.exe error level
|
||||||
|
|
||||||
|
${If} $0 == 0 ; If error level is 0, service exists
|
||||||
|
DetailPrint "Stopping service: Looking Glass (host)"
|
||||||
|
nsExec::ExecToLog 'net.exe STOP "Looking Glass (host)"'
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
!macroend
|
||||||
|
|
||||||
;Install
|
;Install
|
||||||
Section "-Install" Section1
|
Section "-Install" Section1
|
||||||
|
|
||||||
nsExec::Exec 'net.exe STOP "Looking Glass (host)"'
|
!insertmacro StopLookingGlassService
|
||||||
|
|
||||||
SetOutPath $INSTDIR
|
SetOutPath $INSTDIR
|
||||||
File ..\..\looking-glass-host.exe
|
File ..\..\looking-glass-host.exe
|
||||||
@ -147,8 +160,9 @@ SectionEnd
|
|||||||
Section "Looking Glass (host) Service" Section2
|
Section "Looking Glass (host) Service" Section2
|
||||||
|
|
||||||
${If} $option_noservice == 0
|
${If} $option_noservice == 0
|
||||||
|
DetailPrint "Install service: Looking Glass (host)"
|
||||||
nsExec::Exec '"$INSTDIR\looking-glass-host.exe" UninstallService'
|
nsExec::Exec '"$INSTDIR\looking-glass-host.exe" UninstallService'
|
||||||
nsExec::Exec '"$INSTDIR\looking-glass-host.exe" InstallService'
|
nsExec::ExecToLog '"$INSTDIR\looking-glass-host.exe" InstallService'
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
@ -177,8 +191,10 @@ SectionEnd
|
|||||||
Section "Uninstall" Section6
|
Section "Uninstall" Section6
|
||||||
SetShellVarContext all
|
SetShellVarContext all
|
||||||
|
|
||||||
nsExec::Exec 'net.exe STOP "Looking Glass (host)"'
|
!insertmacro StopLookingGlassService
|
||||||
nsExec::Exec '"$INSTDIR\looking-glass-host.exe" UninstallService'
|
|
||||||
|
DetailPrint "Uninstall service: Looking Glass (host)"
|
||||||
|
nsExec::ExecToLog '"$INSTDIR\looking-glass-host.exe" UninstallService'
|
||||||
|
|
||||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Looking Glass (host)"
|
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Looking Glass (host)"
|
||||||
Delete "$SMPROGRAMS\Looking Glass (host).lnk"
|
Delete "$SMPROGRAMS\Looking Glass (host).lnk"
|
||||||
|
Loading…
Reference in New Issue
Block a user