|
|
|
|
#1 |
|
Junior Member
Join Date: Aug 2003
Location: Austria
Posts: 16
|
Hi there again!
I just tried to find out if some process are running but the only way I find was FindWindow. That's pretty nice for 90% of the processes I've to check but at least 6 processes doesn't have any hidden window so I need a possibility to determine if a process is running ... maybe via its exe-name ... that would be great Does anyone of you got any idea how to do that? PS: I do not want to kill the processes I just only need to know if they are running |
|
|
|
|
|
#2 |
|
NSIS Dev
Join Date: Apr 2003
Location: Portugal
Posts: 110
|
The only way is creating a new plugin for this task, I can do that later when I got free time
cyas |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Aug 2003
Location: Austria
Posts: 16
|
I wrote a small C++ (and another C# too) app which takes the process name as command line parameter and do the check for me.
Now it works - thx |
|
|
|
|
|
#4 |
|
Major Dude
Join Date: Jun 2002
Location: Swindon, UK
Posts: 559
|
Would you care to share your app with others? I can host it on the Archive downloads page if you'd like.
|
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Aug 2003
Location: Austria
Posts: 16
|
Of course ... I'll attach the source to this post
Maybe I get enough time to convert it to a NSIS plugin ... The Archive contains another two archives with the c++ and the c# source. Tell me if you got any other questions
|
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Sep 2003
Posts: 192
|
Has this been converted to a plugin? I have a need to check processes and pause if they're running. Thanks - Eric
Eric |
|
|
|
|
|
#7 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
That exe can be ran with Exec/nsExec to use it (I assume)
It is possible to write exe's that act like plugins, but it is harder to get the return value (unless you use nsExec::ExecToStack). -Stu |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Sep 2003
Posts: 192
|
If run this way, wouldn't the exe file have to live on the machine you deploy on? I'm trying to avoid having more pre-requisites on our servers...
Eric |
|
|
|
|
|
#9 |
|
Junior Member
Join Date: Aug 2003
Location: Austria
Posts: 16
|
hi there!
yea you are right - I run this exe with nsExec and put the exe to my installer package - works fine |
|
|
|
|
|
#10 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
stonkers, just copy it to $PLUGINSDIR using the File command. That's what NSIS does when you use a plug-in. The plug-in don't exist on the user's machine until the installer copies them to $PLUGINSDIR.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#11 | |
|
Junior Member
Join Date: Jan 2004
Posts: 8
|
Quote:
And this command only works on installer but not uninstaller (nsExec::ExecToStack "CheckProcess application" $PLUGINSDIR) Anything missed? Thank you! |
|
|
|
|
|
|
#12 |
|
NSIS MUI Dev
Join Date: Nov 2001
Posts: 3,717
|
Add InitPluginsDir before using the plus-ins folder.
|
|
|
|
|
|
#13 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Yes, the plug-ins directory is not the same for the installer and the uninstaller. If you want to use it in the uninstaller, you'd have to copy it to the uninstaller plug-in's directory. Simply copy it somewhere in the uninstaller's code, un.onInit for example (don't forget to call InitPluginsDir before you use $PLUGINSDIR).
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|