Old 31st March 2008, 18:01   #41
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Sorry, wild cards are only supported for window classes/captions. If your executable name is unique enough, just use AddModule \File.exe or AddFile \File.txt

The appended \ ensures that it's a file under a folder and not just the end of a file name.

Stu
Afrow UK is offline   Reply With Quote
Old 31st March 2008, 19:11   #42
jrhutch
Junior Member
 
Join Date: Feb 2008
Location: Austin, TX
Posts: 11
Sorry, my question was for adding multiple files, such as AddFile $Drive\SomeDirectory\*.*, or something to that effect.
jrhutch is offline   Reply With Quote
Old 21st April 2009, 22:27   #43
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
I'm running into two problems with LockedList...

1. It can't seem to detect that the files I specified are in use.
I'm using:
code:

LockedList::AddModule /NOUNLOAD "$SYSDIR\OurDLL.dll"


( I take it /NOUNLOAD is still required even in the new NSIS handling? )
But as far as the search is concerned, the file is not locked. Unlocker ( http://ccollomb.free.fr/unlocker/ ) says otherwise.
Any tools out there that might help in identifying why LockedList doesn't see it while Unlocker does?
( I'd try whouses.exe as well, but I seem to be whouses.exe-less )


2. LockedList crashes after parsing two of such modules.
The search process reaches 93%, usually when it will display that it found no processes using the file(s), and simply crashes.

Stu - if you need a dump for #2 (oh boy, bad puns), just let me know.
Animaether is offline   Reply With Quote
Old 27th April 2009, 21:49   #44
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
well the crashes seem to have magically gone away - #1 remains an issue, however
Animaether is offline   Reply With Quote
Old 29th June 2009, 02:27   #45
freneticmonkey
Junior Member
 
Join Date: Jun 2009
Posts: 1
I have had a look at the source code for the lockedlist plugin and it currently only searches the first 127 modules or files loaded for a process. On my machine Internet Explorer with minimal extensions installed has 150+ modules loaded, which means that searching for ActiveX plugins usually fails.
freneticmonkey is offline   Reply With Quote
Old 29th June 2009, 11:57   #46
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Ah thanks for that. I will be home on Wednesday so will sort then.

Stu
Afrow UK is offline   Reply With Quote
Old 7th July 2009, 09:19   #47
Ocrana
Junior Member
 
Join Date: Nov 2006
Posts: 27
Is there any problem known that LockedList crashes on XP?
I have some users with reports that the installer will crash after 60% of searching the running processes.
Bad Problem: This are users/customers and I do not have access to their computer to debug. ON all my computers and VM builds nothing crash.
If anyone know possible problems, like AV Scanners or similar things please let me know.

Ocrana
Ocrana is offline   Reply With Quote
Old 7th July 2009, 09:23   #48
Ocrana
Junior Member
 
Join Date: Nov 2006
Posts: 27
Hi, just to complete the information:
Installer will crash and computer will reboot automatic.
XP Home on a Intel CPU.

Ocrana
Ocrana is offline   Reply With Quote
Old 7th July 2009, 11:37   #49
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
The plug-in was developed on Windows XP and I never had a crash. Unless I can reproduce there's not much I can do I'm afraid.

Stu
Afrow UK is offline   Reply With Quote
Old 7th July 2009, 11:51   #50
Ocrana
Junior Member
 
Join Date: Nov 2006
Posts: 27
Yeah, I understand this. I hoped someone had the same problem and a solution. The Problem in all is that a "user" who cannot install the software will not answer to a mail

Ocrana
Ocrana is offline   Reply With Quote
Old 24th July 2009, 15:20   #51
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
I have uploaded a new plugin with array sizes increased from 128 to 256.

Stu
Afrow UK is offline   Reply With Quote
Old 25th July 2009, 10:50   #52
Ocrana
Junior Member
 
Join Date: Nov 2006
Posts: 27
Hi Afrow,
I have now 3 people with the reboot problem. On Vista and XP. This are the people who gave me a message, I do not want to know how many people have the same problem without inform us.
However I will send today a version with the new lockedlist to one of the Users in hope to get a response this time.

But please also think about a version that do a deep logging to a text file. This will help very much to handle those issues.

Ocrana
Ocrana is offline   Reply With Quote
Old 26th July 2009, 10:02   #53
Ocrana
Junior Member
 
Join Date: Nov 2006
Posts: 27
Hi,
I got a feedback from a customer, he wrote: "I tried the new installer. The scan now gets to 70% before it reboots the computer on both XP and Vista 32 bit." before it was around 56%.
What we can do?

Ocrana
Ocrana is offline   Reply With Quote
Old 29th July 2009, 01:36   #54
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Sorry I'm quite busy with work at the moment. If I have time at the weekend I will add some switches for logging and maybe upgrade the plugin to use the new plugin API.

Stu
Afrow UK is offline   Reply With Quote
Old 4th December 2009, 07:34   #55
AlexisXu
Junior Member
 
Join Date: Dec 2009
Posts: 1
Hi,Afrow UK,I download Lockedlist's code,and it can't be complied.VC reports errors:
error C2065: 'WM_NOTIFY_OUTER_NEXT' : undeclared identifier
error C2065: 'NOTIFY_BYE_BYE' : undeclared identifier
error C2065: 'pushstring' : undeclared identifier
error C2065: 'popstring' : undeclared identifier
error C2065: 'WM_NOTIFY_CUSTOM_READY' : undeclared identifier
error C2061: syntax error : identifier 'stack_t'
error C2065: 'EXDLL_INIT' : undeclared identifier
error C2061: syntax error : identifier 'stack_t'

Is there same files missing?
AlexisXu is offline   Reply With Quote
Old 4th December 2009, 10:51   #56
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You need ExDll.

Stu
Afrow UK is offline   Reply With Quote
Old 14th December 2009, 10:34   #57
forbjok
Junior Member
 
Join Date: Nov 2002
Posts: 5
LockedList crashes when no files or modules are added

I just found that when running a setup that contains no LockedList::AddModule or LockedList::AddFile calls, and calls LockedList:: Dialog, it crashes with "An unhandles win32 exception" (the regular Windows segfault message).

My guess is that LockedList:: Dialog fails to check whether some variables normally set by AddFile or AddModule are set.

In most cases this is not a problem of course, as usually there will be files to check for, but in this case the NSI script is generated, and will contain LockedList:: Dialog regardless of whether any files were actually found during generation that causes AddFile or AddModule calls to be made.

I can (and probably will) change the generator to also add the LockedList:: Dialog only when needed, but it would probably be a good idea to also make LockedList:: Dialog perform the necessary checks to prevent it from crashing regardless.
forbjok is offline   Reply With Quote
Old 10th March 2010, 22:31   #58
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
v0.9 is now available. Fixed some bugs (including the one last posted; thanks forbjok), added some features, implemented new NSIS plugin API and included a unicode build.

Stu
Afrow UK is offline   Reply With Quote
Old 11th March 2010, 11:54   #59
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Had a crash with the Unicode build which has now been fixed (RC3).

Stu
Afrow UK is offline   Reply With Quote
Old 11th March 2010, 12:58   #60
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
Heya Afrow,

Good to see this plugin still being worked on after all :)

I have no idea if the updates happen to resolve the issue I had earlier - will see eventually in current development, though.

Before upgrading I did run into the crash situation (at 87%, every time) again; it's entirely weird.. changing the compression type, removing a messagebox that displays 2 variables (or changing it so it only displays 1), etc. would make the crash go away; no such crash in the current version as far as I can tell.. but if that sounds indicative of something scary that you'd want to check out anyway, just say the word. The DLL doesn't have version information, buts its date is 2008-02-26.

=====

However, I -am- seeing some garbled output in the dialog list with the new version (edit: non-unicode);
code:

!addplugindir ".\Plugins\"
OutFile "test.exe"

Page Custom customPage

Function customPage
LockedList::AddModule /NOUNLOAD "$WINDIR\notepad.exe"

LockedList::Dialog
FunctionEnd

Section
SectionEnd



Dialog screenshot:
http://img31.imageshack.us/img31/821...listgarble.png

That garbled line goes away once it's done checking.
Animaether is offline   Reply With Quote
Old 11th March 2010, 13:36   #61
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Thanks, I will have a look. Another user is reporting another issue as well (possibly just the Unicode build though).

Stu
Afrow UK is offline   Reply With Quote
Old 11th March 2010, 13:38   #62
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Seems OK here. What operating system?

Stu
Afrow UK is offline   Reply With Quote
Old 11th March 2010, 13:45   #63
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
OK found it. Added to changelog for next build:
code:
Fixed ZeroMemory call:
ZeroMemory(File.ProcessCaption, sizeof(File.ProcessFullPath)); -> ZeroMemory(File.ProcessFullPath, sizeof(File.ProcessFullPath));


Stu
Afrow UK is offline   Reply With Quote
Old 11th March 2010, 14:11   #64
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
XP SP2 32-bit, for the record, but you're way ahead of me
Animaether is offline   Reply With Quote
Old 11th March 2010, 14:15   #65
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
RC4 uploaded. Hopefully both issues sorted.

Stu
Afrow UK is offline   Reply With Quote
Old 11th March 2010, 14:22   #66
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
non-unicode again; no such luck here.. although on the first two runs I got this instead:
http://img694.imageshack.us/img694/1...istgarble2.png
Animaether is offline   Reply With Quote
Old 13th March 2010, 05:01   #67
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
on a different note; from..
http://forums.winamp.com/showthread.php?threadid=293513
..there was a request to add an option to only show the dialog if there were locked files found. Any thoughts on this?
I don't have a need for it myself as I'm performing a few other tests anyway (check if the target file exists, check if the file I want to install is newer, check if the file can be opened for write mode*) and abort the page display if the file being in a locked state isn't an issue.

* I read the thread with the caveat about 'shared write', but apparently some 'locked' files can happily be renamed just as well. Shared write is highly unlikely for the files I'm dealing with (DLLs), so that's okay.
Animaether is offline   Reply With Quote
Old 15th March 2010, 14:24   #68
Alfaromeo
Member
 
Join Date: Mar 2008
Posts: 73
Yes, showing the daialog only if files are locked is a good suggestion. We don't want this dialog to interfere unless it is necessary. BTW, also possibly giving the search path is also a good option . This will avoid by listing all files individually.
Can anyone also tell me if this plugin has any compatibility problem with UMUI, since I'm not able to show the dialog in the same. It just skips to the next dialog in the list , instead of showing the locked files.
Alfaromeo is offline   Reply With Quote
Old 18th March 2010, 12:18   #69
Alfaromeo
Member
 
Join Date: Mar 2008
Posts: 73
Moreover, this plugin is depended upon Microsoft.VC90.CRT runtime . This causes crash of the dialog , since on new machines this does not exist. Any solution ?
Alfaromeo is offline   Reply With Quote
Old 18th March 2010, 15:47   #70
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
I'm a little busy with University at the moment and there are still some issues with LockedList to be sorted. I'll then see if I can sort the CRT dependency.

Edit: And not showing the dialog is not really an option as obviously the scan takes place while the dialog is visible!!

Stu
Afrow UK is offline   Reply With Quote
Old 29th March 2010, 19:28   #71
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Uploaded v1.0:

v1.0 - 29th March 2010
* Fixed CRT dependency.
* Improved percent complete calculations.
* Now pushes /next to stack in between stack items.
* Fixed memory leak in AddItem().
* Fixed crashes caused by using AddFile plug-in function.
* General code cleanup.

I had reports of duplicated Window captions and this may be fixed too.

Stu
Afrow UK is offline   Reply With Quote
Old 30th March 2010, 13:43   #72
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
Sweet - thanks for the update!

Out of curiosity.. what happens with AddModule when supplying 64bit DLLs?
Or, in the case of AddFile, what happens with regard to the filesystem redirection on $SYSDIR / the use of SysNative?

I've adjusted my installers to use $WINDIR\SysNative if ${AtLeastWinVista} and disable/revert FS redirection on XP64 (can't rely on the hotfix/existence of the folder), but it dawned upon me that I haven't the foggiest how LockedList responds to these things

I'll try a few tests myself later - just musing in here.
Animaether is offline   Reply With Quote
Old 30th March 2010, 14:39   #73
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Quote:
As NSIS is 32-bit, the plug-in cannot enumerate modules of 64-bit processes (the AddModule plug-in function). This can only be fixed if a 64-bit version of NSIS is developed.
Disabling redirection will have no effect. It is doing string comparisons only so whatever path you give it is what it will match on. To avoid this issue, you can simply use \subpath\modulename.dll instead of a full path.

Stu
Afrow UK is offline   Reply With Quote
Old 30th March 2010, 15:35   #74
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
gah - totally missed that rather prominently displayed bit in the readme. Any work-around ideas? I can still detect that I can't open it for writing / can't overwrite it, so i can still detect that -something- has it locked.*

Not using the full path should probably work in this instance, even though it reduces it to just the filename. I suppose that might give issues if, say, one wants to check what application is locking "c:\somedir\somefile.ext" by using "somefile.ext" and another application has "c:\anotherdir\somefile.ext" open.
Edit: Not that there's any point in doing this in my case - given that they're 64bit DLLs.

* Edit: I suppose I could use LockedList's stack output function for the 32bit parts, my own functions (that don't identify the locking process, of course) for the 64bit parts and populate some manner of list display myself - possibly using an NSDialogs timer to refresh the list periodically (not spotting a hook into the automatic update part of the LockedList dialog - and I'd need the timer for my own function anyway). Hmmm.
Animaether is offline   Reply With Quote
Old 30th March 2010, 16:59   #75
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Unfortunately there isn't a way around this (at least not using EnumProcessModules/EnumProcessModulesEx). I guess one option is to use the AddApplication plug-in function on top of a manual lock check.

Stu
Afrow UK is offline   Reply With Quote
Old 30th March 2010, 17:23   #76
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
AddApplication? I saw the AddApplications method (not documented, but in the examples), but figured that was a bit heavy-handed; other (InstallShield, I think) installers claiming every single application must be closed (usually for no good reason) often just tend to annoy me

Short of creating a completely custom page - is there any way to add to the LockedList list manually? I suppose through poking at SysListView32 directly, if nothing else. Might be cleaner to add a method to add custom data, but I'm not sure how that would interfere with things like the context menu, automatic clearing of items, etc.
Animaether is offline   Reply With Quote
Old 30th March 2010, 18:05   #77
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
oh, on a rather unrelated note, I'm still getting the odd bits in the top of the list - but the new version at least seems to spit out some useful information; it reports the process ID as 4 (which, according to taskman, is the System process).
This is from the supplied module/notepad example:
http://img225.imageshack.us/img225/9...epadexampl.png

I have no idea why it's listing that - notepad certainly isn't running (if it is, it adds a 2nd line listing notepad itself). Windows XP, 32bit, SP2 and any other information you'd need, just say the word
Animaether is offline   Reply With Quote
Old 30th March 2010, 18:49   #78
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Sorry should have mentioned that was fixed a few mins after I uploaded. Yeh not sure why I added AddApplications - someone must have asked for it. Probably useful if you are going to be rebooting the system after installation and you don't want people to lose their work. How about AddClass or AddCaption? How would adding custom data work?

If your application is 64-bit, did you try adding the actual executable using AddModule? That should work.

Stu
Afrow UK is offline   Reply With Quote
Old 30th March 2010, 19:11   #79
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
Ah, I'll have to re-test.

=====

Unfortunately, AddClass, AddCaption, looping over processes etc. wouldn't do much good as I don't have the particulars of the application(s) that might use these libraries. They're basically DLLs that other developers can, and are likely to, make use of.. but I don't think we can dictate "Thou Shalt Useth This Class"

Adding (err.. and removing, I suppose) custom data basically just to populate the list and have LockedList realize whether the list is empty or not.

E.g. Let's say I run my own function to at least check if -something- is locking a 64bit file.. I can't tell what is locking it, but at least I can tell the user that something is. Quite possibly, they'll know what's locking it and can then close it.

So having identified that a particular file is locked, say I call:
LockedList::AddCustomItem "path\filename" ["unknown process"]
That adds the custom item to the locked list internal list and display list. The display list so that, obviously, it is displayed..and the internal list so that if the other locks that LockedList handled itself are closed, it doesn't immediately report that there's nothing left to close.

This would require a companion function a la...
LockedList::RemoveCustomItem "path\filename" that would remove the matching item. I'm *presuming* that it wouldn't require some manner of unique ID to be returned from AddCustomItem that would then get fed to RemoveCustomItem, instead just string matching.. but whatever is easier/better/etc.
This function would get called if my own function determines that said lock is, in fact, gone.

Unfortunately this probably means quite a few other changes - can't just add an nsDialogs timer to your dialog to periodically call my function / add a button to manually refresh / etc. so the plugin would have to call it and so forth and so on.

Hence why I was already thinking that -maybe- it's better I create my own custom page with a list (probably through EmbeddedList), and populate that out of the LockedList stack methods. I'd lose the automatic checking - instead having to re-requery LockedList.. or.. actually I guess I can just check if the process that LockedList reported is still present when I do my refresh.. that should have the same effect?

I'd better check that System process bit first
Animaether is offline   Reply With Quote
Old 30th March 2010, 19:12   #80
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
Thumbs up

System process being reported has indeed been fixed - thanks!
Animaether is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Tags
handle, plug-in

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump