Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   LockedList plug-in (http://forums.winamp.com/showthread.php?t=274168)

Afrow UK 16th March 2012 10:01

You are using the Unicode plug-in with Unicode NSIS right?

Stu

stopasking 16th March 2012 11:08

Hi, thanks for your quick reply.

No, at the moment I am using the ANSI plugin with NSIS. But, because of some problems with my script I played a lot around with your plugin and also tested the UNICODE version.
Therefore I discovered these problems/bugs/inconsistencies.

Maybe its no bug then sorry for wasting your time...

Oh, but one other thing: Using the ANSI Plugin / 2.46 NSIS / Win7 X64. Installed on my test system was the AMD catalyst conrol center (sorry, at the moment I don't know which version - but I can receive it when you want to know).
The problem: while searching for processes it seems your plugin "touches" this running program (the control center) and causing it to crash.
Maybe the way you gain access to the running programs is the problem? The AMD tool was not in my lockedlist, btw. and it was the only program where I discovered such a behaviour but reproducable :)

Afrow UK 16th March 2012 12:39

You didn't answer my question. If you want to use the Unicode version of the plug-in you have to use the Unicode version of NSIS as well. Otherwise you experience the kind of 'bugs' you are getting.

Edit: But if you are using the Unicode NSIS build then I will check it out.

Stu

stopasking 16th March 2012 17:39

You are right - my fault. I did not use the NSIS UNICODE version. I will check it out and if this problem still exists I will come back to you.

Sorry for this and thanks for your help!

But the problem with the crashed catalyst tool while scanning for processes still exists and I used the ANSI plugin...

Anyway, thanks again!!

LoRd_MuldeR 22nd March 2012 00:05

Hi.

Is sometimes get the problem that the LockedList plug-in will get stuck in the "Cancelling search, please wait..." state.

http://img163.imageshack.us/img163/1...2kerrorv2p.jpg

It will go on, as soon as I press some key or move the mouse cursor...

My code looks like this:
http://pastie.org/private/bfkzo1mn4adypn2t83xtq

Thanks in advance for any advice :)

Afrow UK 22nd March 2012 11:57

Will look into it as soon as I can.

Stu

C.R.a.S.H 22nd March 2012 12:53

Win7 x64

After click on Copy List menu item, clipboard has only string "1"

C.R.a.S.H 23rd March 2012 05:37

Quote:

Which version of NSIS are you using?

Which version of the LockedList plugin are you using?

Does the problem occur in one of the example scripts supplied with the LockedList plugin?
I'm using last version of NSIS Unicode (nsis-2.46.4-Unicode)
And last (2.6) or previous (2.5) versions of the LockedList plugin

This problem can reproduce with all LockedList example scripts (ex: LockedListShell32.nsi)

Afrow UK 23rd March 2012 11:41

New version uploaded:
Quote:

2.6.0.1 - 23rd March 2012
* Fixed clipboard list copy for the Unicode build.
* Fixed crashes and infinite looping after repeatedly going back to the LockedList page.
Let me know if you find any other issues or issues still remain.

Stu

LoRd_MuldeR 23rd March 2012 11:44

Thank you for the update!

I will check if it still hangs at "Cancelling search, please wait..." on my Win2k machine as soon as I get home...

Afrow UK 23rd March 2012 11:48

I wasn't able to get it to hang there exactly but going to and from the page repeatedly resulted in an infinite loop or crash occurring which sounds like it could be the same issue (i.e. occurring on page leave).

Stu

LoRd_MuldeR 23rd March 2012 20:52

Quote:

Originally Posted by Afrow UK (Post 2852181)
I wasn't able to get it to hang there exactly but going to and from the page repeatedly resulted in an infinite loop or crash occurring which sounds like it could be the same issue (i.e. occurring on page leave).

Stu

It still happens on my Win2k machine :(

C.R.a.S.H 27th March 2012 10:13

1 Attachment(s)
Quote:

Originally Posted by Afrow UK (Post 2852177)
New version uploaded:Let me know if you find any other issues or issues still remain.

Stu

Everything ok!
Thanks.

I found other issue
In XP SP2 (last NSIS Unicode and last plagin)



Step to reproduce

code:

LockedList::AddClass MozillaUIWindowClass
LockedList::AddClass MozillaWindowClass
LockedList::AddClass Chrome_WidgetWin_0
LockedList::AddClass IEFrame
LockedList::AddClass {1C03B488-D53B-4a81-97F8-754559640193}



1. Open Google Chrome and Safari
2. Run Installer
3. Go to Close programs page
4. Several times during this step click Back and (from the previous step) Next

Afrow UK 27th March 2012 11:27

What exactly is the issue? You haven't explained what it is.

Stu

LoRd_MuldeR 7th April 2012 20:41

Quote:

Originally Posted by LoRd_MuldeR (Post 2851865)
Hi.

Is sometimes get the problem that the LockedList plug-in will get stuck in the "Cancelling search, please wait..." state.

http://img163.imageshack.us/img163/1...2kerrorv2p.jpg

It will go on, as soon as I press some key or move the mouse cursor...

My code looks like this:
http://pastie.org/private/bfkzo1mn4adypn2t83xtq

Thanks in advance for any advice :)

http://img11.imageshack.us/img11/811...twineerror.png

I noticed that this doesn't only happen on my Win2k machine, it also happens under Wine (tested under version 1.4).

Seems like it is "hanging" because it is waiting for some message, that, for whatever reason, doesn't arrive on Win2k or Wine.

The WM_MOUSEMOVE message will eventually "unlock" it again, so that the installer can finally proceed...

Afrow UK 21st April 2012 23:25

New version:
Quote:

2.6.0.2 - 22nd April 2012
* Fixed window message loop halting page leave until mouse move on Windows 2000.
Stu

LoRd_MuldeR 21st April 2012 23:58

Quote:

Originally Posted by Afrow UK (Post 2857996)
New version:Stu

http://forum.doom9.org/images/smilies/thanks-t.gif

pocruadhlaoich 25th April 2012 14:54

1 Attachment(s)
Hi,
I have a customer who wants to install our software but is being prevented from doing so because they are being asked to close a lot of processes that they do not want to ( please see attached image ).
The code that I am using is as follows:

PHP Code:

#installer pages

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "${MY_DEPENDENCIES_FOLDER}\installer\License\License.txt"
Page Custom LockedListPage
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

#uninstaller pages

!insertmacro MUI_UNPAGE_WELCOME
UninstPage Custom un
.LockedListPage
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

Function LockedListPage
    
#custom dialog shown during installation which will check if any required files need to be closed
    
    
!insertmacro MUI_HEADER_TEXT "Close Required Files" "Files that must be closed so that setup can continue."
    
LockedList::AddFolder $INSTDIR
    LockedList
::Dialog
    Pop $R0
FunctionEnd

Function un.LockedListPage
    
#custom dialog shown during uninstallation which will check if any required files need to be closed
    
    
!insertmacro MUI_HEADER_TEXT "Close Required Files" "Files that must be closed so that setup can continue."
    
LockedList::AddFolder $INSTDIR
    LockedList
::Dialog
    Pop $R0
FunctionEnd 

Can you see any reason why it thinks that so many processes need to be stopped? The installer would add .exe's, .dll's and various help files to the computer. Our software has not even been installed onto this computer yet, so I am not sure what to do. Should I call something other than AddFolder?

Afrow UK 25th April 2012 15:22

What is the value of $INSTDIR? Yeah AddFile/AddFolder may not work properly on Windows 7. I need to retest those probably. I would recommend trying AddModule instead (32-bit binaries only).

Edit: Ignore what I just said. Just fixed it.
http://nsis.sourceforge.net/File:LockedList.zip

No idea how that was broken for so long with nobody noticing :)
Quote:

2.6.1.0 - 25th April 2012
* Fixed StartsWith() matching incorrectly for some strings.
Edit 2: You may still want to look into AddModule though as it is a lot faster than AddFile/AddFolder. Unfortunately it will only work for 32-bit modules as NSIS is 32-bit.

Stu

pocruadhlaoich 25th April 2012 15:56

Hi Afrow,
$INSTDIR = "C:\Program Files (x86)\InspecVision\Planar"
At this time in the install, this would be the default location for where the product would be installed. The customer is trying to install it there for the first time, so given that the directory doesn't exist yet, then it should not be complaining about anything.
Just to confirm, this is an example of me calling AddFolder under Windows 7 and having problems with it. I will take a look into AddModule now and get back to you with any progress.
Thanks,
Patrick

pocruadhlaoich 27th April 2012 08:46

Hi Afrow,
I changed my installer to use AddModule and this seems to work much better on my customer's Windows 7 machine. I was able to do a remote connection with them when the installer was using AddFolder and due to their IT environment it was showing about 10 unrelated processes and services ( eg mcafee ) that needed to be closed before installation could continue. Using AddModule all is fine. Thanks for your help :)
Patrick

Afrow UK 27th April 2012 10:30

Did you not get my message or see my post edit? I fixed AddFolder - or are you saying that fix is not working?

Stu

pocruadhlaoich 27th April 2012 10:53

I saw your original message but I hadn't seen the edit to it. This problem is only really repeatable on the customer's machine, so I now that I know that AddModule is working I have already sent him an installer using it. I don't have access to test out your new AddFolder code unfortunately unless the customer comes back with anything else. If they do, I will definitely let you know.

Afrow UK 27th April 2012 11:16

OK thanks. In my test I used a folder path that didn't exist and had some matches, which sounds like the same issue.

Stu

neilsut 4th May 2012 15:10

Hi there, I have been trying to get this plugin to work with no luck. I'm sure it must be something simple that I am doing wrong.

I am trying to use it as follows:-

PHP Code:

Function LockedListShow
  
!insertmacro MUI_HEADER_TEXT `LockedList Test` `Using FindProcess`
  
LockedList::FindProcess notepad.exe
  LockedList
::Dialog /autonext
  Pop $R0
FunctionEnd 

I'm using notepad here just as a test. When I run it the locked list page appears with the 'No programs that have to be closed are running' message showing, regardless of whether notepad.exe is running or not.

I've also tried the sample lockedlistfindprocess.nsi with no luck either. It does not display any prompts if notepad is running.

I've tried running on XP and 7, 32 and 64 bit, all with the same result.

Any ideas what could be going wrong?

Cheers,

Neil.

Afrow UK 4th May 2012 15:17

You are not using the plug-in correctly. Look at the example scripts. There is an example script specifically for FindProcess (which is a utility function - LockedListFindProcess.nsi) and one for showing the LockedList dialog with notepad (LockedListNotepad.nsi).

Stu

neilsut 8th May 2012 09:25

Hi Stu, thanks very much for your help.

It's a shame that I can't use FindProcess with the dialog. However, I've tried both the LockedListFindProcess.nsi and LockedListNotepad.nsi samples, both of which do not detect that notepad is running. I've tried changing the scripts to check for other executables that I have running with the same negative results.
It makes me wonder if there might be something up with my system that could cause this. Any ideas?

Cheers,

Neil.

Afrow UK 8th May 2012 10:45

You don't need to use FindProcess - the whole idea is you use the plug-in to detect a locked file, folder or module (dll/exe) and it will display the process(es) that is locking it. If you want to add a process yourself, you can use FindProcess in a custom callback - see the LockedListCustom.nsi example script.

AddModule will not find 64-bit processes because NSIS is 32-bit. If you are running Windows x64 then you must run notepad.exe from SysWOW64 for the Notepad example to work. Yes this is a big drawback to the plug-in but unfortunately this is a limitation imposed by Windows. The readme clearly states this fact too - please read it.

Edit: I do have plans to add an AddProcess method some day which will work on 32bit/64bit Windows (by using WMI).

Stu

neilsut 8th May 2012 11:53

Yes I have read the readme and was aware of the 64 bit limitation, which is something I need to work around for my application.

I've tried the LockedListCustom.nsi example, and even that is not working. From looking at the script code I would expect to see a message box asking if My App v1.0 is running. However I don't see this, the page just says "No programs that have to be closed are running". So it looks like the callback is not being called?

To give you some background, the problem that I am trying to solve is this. We write add-ins for AutoCAD. These add-ins are locked when AutoCAD is running so I need a way to prompt the user to close it. The complication is that AutoCAD comes in many flavours, languages, versions, plus 32 and 64 bit. The one constant is that its executable is always acad.exe. So I am thinking that my installer should be checking if acad.exe is a running process. However I can't seem to get the lockedlist plugin to do this.

Edit: I've also tried the LockedListEnumProcesses.nsi example, and this too does not seem to work at all. I.e. no processes are listed in the details window.

Any help you can provide would be much appreciated.

Cheers,

Neil.

Afrow UK 8th May 2012 14:44

If nothing is working then the first thing I would check is if you've extracted the correct plug-in DLL. There's a Unicode version and an ANSI version - if you aren't using Unicode NSIS then you must use the ANSI version. I have just tested those two scripts and they are working fine for me (Windows 7 x64). In fact EnumProcesses is picking up 64-bit processes and their paths too - I'll look into that and see if I can get it to work for AddModule (when giving it an executable file).

Edit: I just tried AddModule again and it does actually work for 64-bit processes after all (I was trying to find notepad.exe when I use notepad2.exe)! What it cannot do is find 64-bit DLL files (the 64-bit processes that are using them). I should update the readme. Either I fixed it myself some point or Microsoft have changed their API's to work for 32-bit processes via a Windows update.

Stu

neilsut 8th May 2012 15:42

Well it turns out that I was inadvertently trying to use the unicode build with an ansi installer. In my defence, it seems to have been caused by a bug in IZArc which I used to extract the dll from the zip file.

Anyway, it all seems to be working on both 32 and 64 bit now, so thanks very much for your help with this!

Cheers,

Neil.

Afrow UK 3rd June 2012 17:52

New version.
Quote:

2.6.1.1 - 3rd June 2012
* Added autoclose code to SilentSearch.
* Fixed some bugs in SystemEnum (v1.5).
This version allows you to close your running programs via a callback function. It is useful if you do not wish to use the UI.

http://nsis.sourceforge.net/File:LockedList.zip

Stu

notedible 29th June 2012 18:51

Back button does not work with autonext
 
Firstly, thanks for the great plugin!

When using
code:
LockedList::Dialog /autonext
the back button doesn't work properly and instead takes you to the next page. Not really the desired behaviour since it prevents the user from going back past a certain point in the installer. This is using the latest ANSI plug-in (2.6.1.1).

Afrow UK 29th June 2012 20:02

I cannot reproduce using the example script (LockedListAutoClose.nsi). Can you attach a full script that reproduces the issue?

Stu

Afrow UK 1st July 2012 22:45

New version:
Quote:

2.6.1.2 - 1st July 2012
* Kills processes with no windows when using autoclose with SilentSearch.
Stu

notedible 2nd July 2012 18:59

Quote:

Originally Posted by Afrow UK (Post 2869356)
I cannot reproduce using the example script (LockedListAutoClose.nsi). Can you attach a full script that reproduces the issue?

Stu

It seems the problem is more specific. Also, it is with autonext, not autoclose, that the problem exists. Using LockedListAutoNext.nsi as a base, I can reproduce the problem every time as long as notepad is not running. It seems that the problem occurs when no results are in the list while searching. The behavior is easier to see if AddFolder is used instead of AddModule. For instance, replace:
code:
LockedList::AddModule $SYSDIR\notepad.exe

in LockedListAutoNext.nsi with:
code:
LockedList::AddFolder $SYSDIR\some_unused_or_non_existent_dir

and you can see the back button behaves like the next button. But if you change the folder to one that must be in use so that you get results, such as:
code:
LockedList::AddFolder $SYSDIR

then the back button works correctly (even while search is ongoing).

So again, the problem is only present when the result list is empty during search with /autonext

Afrow UK 2nd July 2012 19:26

Ah my bad for some reason I read that as autoclose. I need to get more sleep! I will check it out soon.

Stu

Afrow UK 3rd July 2012 21:22

1 Attachment(s)
What you must do is call Abort in your NSIS code if you have clicked Back from the next page, rather than show the LockedList dialog. This can be done by setting and checking a variable - see attached.

Edit: LockedList cannot do this for you as it does not automatically know nor can automatically know (to my knowledge) that you have just clicked the Back button on the next page.

Stu

notedible 10th July 2012 22:38

Quote:

Originally Posted by Afrow UK (Post 2870021)
What you must do is call Abort in your NSIS code if you have clicked Back from the next page, rather than show the LockedList dialog. This can be done by setting and checking a variable - see attached.

But the problem is on the LockedList page itself. The first time the LockedList page shows up, if I click Back (during the scan) then it goes to the next page, but only if there are no results yet. If there are results and the scan is still in progress, the Back button works fine.

In other words:

1. Navigate to a LockedList page
2. During the scan, click Back

If:

a. there was a partial list of results at the time the Back button was clicked, then it will go back (as expected)
b. there were no results at the time the Back button was clicked, then it will go to the next page (NOT EXPECTED)

'a' is the desired behavior regardless of whether search has found anything or not. I understand the behavior you mean if the user has already navigated past the LockedList page where we would skip back to the page before the LockedList page, but this behavior should not happen while the LockedList page is visible, and especially not on the first view of the page. I hope this clears up what I'm hoping to fix!

Afrow UK 10th July 2012 23:23

Sorry I misunderstood what you were saying. But what I thought you were saying is also a valid problem. LockedList will block you from going back once you get to the next page if no programs are running - to fix requires the code I attached. I'll look into this other problem soon.

Stu


All times are GMT. The time now is 17:39.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.