is there a way to prevent from a third party exe to kill my process in nsis

StackOverflow https://stackoverflow.com/questions/21679871

  •  09-10-2022
  •  | 
  •  

문제

I'm running a third party executable within my nsis script which kills my process.

Is possible to prevent this ?

도움이 되었습니까?

해결책

The user should be in control of their own machine and that means killing and/or debugging any process they want to.

The only way to prevent someone from killing your process would be to install some type of rootkit that prevents killing or hides the process from the process list but that would be evil so don't do it!

Edit: What if you put one process between you and the script?

!define THESCRIPT "$sysdir\calc.exe"

Section
ExecWait '"cmd.exe" /c if 1==1 "${THESCRIPT}"'
SectionEnd

or

!include LogicLib.nsh
!include FileFunc.nsh
Section
${GetParameters} $0
${GetOptions} "$0" "/DONTKILLME=" $1
${If} $1 != ""
        ExecWait '$1'
${Else}
        ExecWait '"$exepath" /DONTKILLME="${THESCRIPT}"'
${EndIf}
SectionEnd
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top