WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > FindProc usign MUI
  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
rafaeldmt
Junior Member

Registered: Nov 2007
From:

FindProc usign MUI

Hello,

I'm trying to check if notepad.exe is running.

in .onInit, i call the macro, but allways show that "Is not Running". Do you know what can be the problem? I compile in Unicode. Maybe can be a path problem?

Function .onInit
!insertmacro MUI_RESERVEFILE_LANGDLL
!insertmacro MUI_LANGDLL_DISPLAY
!insertmacro CHECK_NOTEPAD_RUNNING
FunctionEnd

!macro CHECK_NOTEPAD_RUNNING
FindProcDLL::FindProc "notepad.exe"
StrCmp $R0 "1" found not_found
found:
MessageBox MB_ICONEXCLAMATION|MB_OK "Is running" Abort
not_found:
MessageBox MB_ICONEXCLAMATION|MB_OK "Is Not Running"
!macroEnd

Thanks,

Rafa

Quick Link | Report this post to a moderator | IP: Logged

rafaeldmt is offline Old Post 12-03-2007 10:57 AM
Click Here to See the Profile for rafaeldmt Click here to Send rafaeldmt a Private Message Click Here to Email rafaeldmt Find more posts by rafaeldmt Add rafaeldmt to your buddy list Edit/Delete Message Reply w/Quote
Anders
Major Dude

Registered: Jun 2002
From: N/A

It seems to be case sensetive (major bug)

on my system:
FindProcDLL::FindProc "Notepad.exe"
MessageBox mb_ok $R0 >> 1

FindProcDLL::FindProc "notepad.exe"
MessageBox mb_ok $R0 >> 0

__________________
IntOp $PostCount $PostCount + 1

Quick Link | Report this post to a moderator | IP: Logged

Anders is offline Old Post 12-03-2007 11:10 AM
Click Here to See the Profile for Anders Click here to Send Anders a Private Message Visit Anders's homepage! Find more posts by Anders Add Anders to your buddy list Edit/Delete Message Reply w/Quote
rafaeldmt
Junior Member

Registered: Nov 2007
From:

Hello Anders,

I'm sorry, it is doesnt work. I attach an small project, just to test that. Please may you test if it is works in your case? In my case never is running the program.

I'm crazy finding the solution. But maybe is a problem becuase I'm using Unicode compiler, but in theory it doesnt affect, but...

Thanks,

Rafa

Attachment: myapp_install.nsi
This has been downloaded 245 time(s).

Quick Link | Report this post to a moderator | IP: Logged

rafaeldmt is offline Old Post 12-03-2007 11:22 AM
Click Here to See the Profile for rafaeldmt Click here to Send rafaeldmt a Private Message Click Here to Email rafaeldmt Find more posts by rafaeldmt Add rafaeldmt to your buddy list Edit/Delete Message Reply w/Quote
Anders
Major Dude

Registered: Jun 2002
From: N/A

I was using the size optimized version from http://nsis.sourceforge.net/FindProcDLL_plug-in , the other one seems to work fine (http://nsis.sourceforge.net/mediawi...3c/FindProc.zip)

So, use the 24k version

You should also consider using the LogicLib so you can write code like:

!include LogicLib.nsh
FindProcDLL::FindProc "notepad.exe"
${If} $R0 == 1
MessageBox mb_ok "foo"
quit
${Else}
MessageBox mb_ok "bar"
${EndIf}

__________________
IntOp $PostCount $PostCount + 1

Quick Link | Report this post to a moderator | IP: Logged

Anders is offline Old Post 12-03-2007 11:31 AM
Click Here to See the Profile for Anders Click here to Send Anders a Private Message Visit Anders's homepage! Find more posts by Anders Add Anders to your buddy list Edit/Delete Message Reply w/Quote
rafaeldmt
Junior Member

Registered: Nov 2007
From:

Thanks for your quick answer.

I compile again the vc++ project and I replace all the old DLL. I changed the code and LogicLib is included. Please, may you test if works in your computer? Im testing here in two and doesn't works, always msg "bar".

Thanks,

Attachment: myapp_install_2.nsi
This has been downloaded 233 time(s).

Quick Link | Report this post to a moderator | IP: Logged

rafaeldmt is offline Old Post 12-03-2007 12:10 PM
Click Here to See the Profile for rafaeldmt Click here to Send rafaeldmt a Private Message Click Here to Email rafaeldmt Find more posts by rafaeldmt Add rafaeldmt to your buddy list Edit/Delete Message Reply w/Quote
Anders
Major Dude

Registered: Jun 2002
From: N/A

Why do you have to compile yourself? the large dll on the wiki works fine for me

__________________
IntOp $PostCount $PostCount + 1

Quick Link | Report this post to a moderator | IP: Logged

Anders is offline Old Post 12-03-2007 12:19 PM
Click Here to See the Profile for Anders Click here to Send Anders a Private Message Visit Anders's homepage! Find more posts by Anders Add Anders to your buddy list Edit/Delete Message Reply w/Quote
rafaeldmt
Junior Member

Registered: Nov 2007
From:

I compliled becuase with the official DLL doesn't works. Now I see that is not a problem of the DLL. Are you running on Vista?

Quick Link | Report this post to a moderator | IP: Logged

rafaeldmt is offline Old Post 12-03-2007 12:34 PM
Click Here to See the Profile for rafaeldmt Click here to Send rafaeldmt a Private Message Click Here to Email rafaeldmt Find more posts by rafaeldmt Add rafaeldmt to your buddy list Edit/Delete Message Reply w/Quote
Anders
Major Dude

Registered: Jun 2002
From: N/A

nope, XP SP2 MCE2k5UR2/IE6

__________________
IntOp $PostCount $PostCount + 1

Quick Link | Report this post to a moderator | IP: Logged

Anders is offline Old Post 12-03-2007 12:42 PM
Click Here to See the Profile for Anders Click here to Send Anders a Private Message Visit Anders's homepage! Find more posts by Anders Add Anders to your buddy list Edit/Delete Message Reply w/Quote
Fightin_Foo
Junior Member

Registered: Nov 2007
From: Ohio

I've also had some problems with FindProcDLL on Vista, you might want to check out the Processes Plugin. It seems to work pretty well on Vista. I am not sure if it will solve your case sensitive problem though, but it may be worth a shot.

__________________
From there to here,
from here to there,
funny things
are everywhere.

Dr. Seuss
"One Fish Two Fish Red Fish Blue Fish"

Quick Link | Report this post to a moderator | IP: Logged

Fightin_Foo is offline Old Post 12-03-2007 03:12 PM
Click Here to See the Profile for Fightin_Foo Click here to Send Fightin_Foo a Private Message Click Here to Email Fightin_Foo Find more posts by Fightin_Foo Add Fightin_Foo to your buddy list Edit/Delete Message Reply w/Quote
rafaeldmt
Junior Member

Registered: Nov 2007
From:

Hi,

I test also and it doesn't work. Do you think that works in nsis unicode can be the problem?

Please, may you compile and test if it detect correctly?

Thanks for the help.

Rafa

Attachment: myapp_install_2.nsi
This has been downloaded 202 time(s).

Quick Link | Report this post to a moderator | IP: Logged

rafaeldmt is offline Old Post 12-03-2007 07:56 PM
Click Here to See the Profile for rafaeldmt Click here to Send rafaeldmt a Private Message Click Here to Email rafaeldmt Find more posts by rafaeldmt Add rafaeldmt to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 09:41 PM. Post New Thread    Post A Reply
  Last Thread   Next Thread
WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > FindProc usign MUI
Show Printable Version
 | 
Email this Page
 | 
Subscribe to this Thread

Forum Jump:
 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is off
vB code is ON
Smilies are ON
[IMG] code is ON