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