Archive: KillProcDLL


KillProcDLL
I'm new to all of this and have searched the forum for the answer to my question and couldn't find it.

I want to kill a process, and I found this:
http://nsis.sourceforge.net/archive/...php?pageid=271

I downloaded the plug-in and put it in the correct folder.

I added this line to the code:

  KillProcDLL::KillProc "process_name.exe"

(I changed process_name.exe to the actual process name).

When I go to compile it, I get this error message:
Error: Can't add entry, no section or function is open!
Error in script "C:\Program Files\NSIS\Examples\aimskins.nsi" on line 26 -- aborting creation process
Line 26 is
  KillProcDLL::KillProc "process_name.exe"


Does anyone know how to fix my problem?

have you checked if the killproc function appears in the list at the top of the makensis output showing what functions from plugins are available to be used?

-daz


This is what the log says:

MakeNSIS v2.0b3 - Copyright 1999-2003 Nullsoft, Inc.

Portions Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler (zlib).
Includes portions derived from bzip2 (see documentation for details).
Contributors: nnop@newmail.ru, Ryan Geiss, Andras Varga, Drew Davidson, Peter Windridge, Dave Laundon, Robert Rainwater, Yaroslav Faybishenko, Jeff Doozan, Amir Szekely, Ximon Eighteen, et al.



Processing config:
Changing directory to: "C:\Program Files\NSIS\Examples"

Processing plugin dlls: "C:\Program Files\NSIS\plugins\*.dll"
- advsplash::show
- Banner::destroy
- Banner::show
- BgImage::Destroy
- BgImage::Init
- BgImage::SetImage
- BgImage::Sound
- Dialer::AttemptConnect
- Dialer::AutodialHangup
- Dialer::AutodialOnline
- Dialer::AutodialUnattended
- Dialer::GetConnectedState
- InstallOptions::dialog
- InstallOptions::initDialog
- InstallOptions::show
- KillProcDLL::KillProc
- LangDLL::LangDialog
- nsExec::Exec
- nsExec::ExecToLog
- nsExec::ExecToStack
- nsisdl::download
- nsisdl::download_quiet
- splash::show
- StartMenu::Select
- System::Alloc
- System::Call
- System::Copy
- System::Free
- System::Get
- System::Int64Op
- System::Store
- UserInfo::GetAccountType
- UserInfo::GetName


Processing script file: "C:\Program Files\NSIS\Examples\aimskins.nsi"
Name: "Installer"
OutFile: "install.exe"
Error: Can't add entry, no section or function is open!
Error in script "C:\Program Files\NSIS\Examples\aimskins.nsi" on line 26 -- aborting creation process

Does anyone know how to fix my problem?

Also, I have this as part of my script:

Section "Install (required)"

SectionIn RO

; Set output path to the installation directory.
SetOutPath $INSTDIR

; Put file there
File "..\run.exe"

SectionEnd


How do I make it run the run.exe file after I install it (I don't want it as an option...I want it to be required)?

The error message says exactly what's wrong. You can't use instructions outside of a section or a function, plug-in calls included.


Use Exec or ExecWait in .onInstSuccess to execute that program.