|
|
#121 |
|
Major Dude
Join Date: Feb 2007
Posts: 672
|
|
|
|
|
|
|
#122 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
LockedList::IsFileLocked doesn't show the UI. It is purely a utility function to avoid having to use FileOpen (it does that internally).
Edit: I will sort that bug/typo later ![]() Stu |
|
|
|
|
|
#123 |
|
Member
Join Date: Mar 2008
Posts: 73
|
This is a codec filter binary with extension ".ax" . This codec filter is installed by my application as well as ,it will be shared by some third party applications. Hence the need , to detect whether this is locked or not when I reinstall or upgrade my application .
I tried the IsFIleLocked function , but it did not appear to sense it was locked. Is this a bug as Stu pointed out? |
|
|
|
|
|
#124 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
You mean IsFileLocked always returns false? Does FileOpen work (follow jpderuiter's link)?
Stu |
|
|
|
|
|
#125 |
|
Member
Join Date: Mar 2008
Posts: 73
|
Yes that is what is happening.
BTW, this being a binary file will FileOpen work? |
|
|
|
|
|
#126 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
FileOpen (CreateFile) works on any file. Try it.
Stu |
|
|
|
|
|
#127 |
|
Member
Join Date: Mar 2008
Posts: 73
|
Yes FileOpen code snippet from the other forum worked as expected.
What is the issue here |
|
|
|
|
|
#128 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Show me the LockedList plug-in code you are using. As I said, my plug-in code is the same as using FileOpen so you must be doing something wrong.
Stu |
|
|
|
|
|
#129 | ||
|
Major Dude
Join Date: Jun 2001
Posts: 1,173
|
I don't think it does, though?
From an earlier discussion (same thread): Quote:
Quote:
...wouldn't it be subject to the same difference? Just in case there -shouldn't- be a difference after all, the following example should work to demonstrate: PHP Code:
Last edited by Animaether; 28th April 2010 at 17:52. Reason: typo |
||
|
|
|
|
|
#130 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Thanks, both issues should be fixed. For some reason I had omitted GENERIC_WRITE on CreateFile (in IsFileLocked) so I am suprised IsFileLocked ever worked at all.
Stu |
|
|
|
|
|
#131 |
|
Major Dude
Join Date: Jun 2001
Posts: 1,173
|
yay
![]() Any thoughts on that Ignore button bit? (custom Ignore text not getting cleared once list is empty) |
|
|
|
|
|
#132 |
|
Member
Join Date: Mar 2008
Posts: 73
|
It works now. Possible to get a array of processes that is being used by the concerned file if locked. Will be helpful for me to display the same in the MessageBox and take user action.
|
|
|
|
|
|
#133 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
@Animaether
Ah didn't see that one sorry. There's no code in there to set it back so I will add it when I have time. Stu |
|
|
|
|
|
#134 |
|
Member
Join Date: Mar 2008
Posts: 73
|
Stu,
I acheived my option , by using the SilentSearch option from the examples listed. Although I have listed another query sometime back in this forum , was not answered. Is their any option to give search path , instead of individual files. This will ease listing files one by one |
|
|
|
|
|
#135 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Currently only files are supported but I will add this when I have time (AddFolder). Got exams coming up so I can't promise anything soon!
Stu |
|
|
|
|
|
#136 | ||
|
Major Dude
Join Date: Jun 2001
Posts: 1,173
|
Quote:
![]() Quote:
Let's say you need to overwrite a few files in 'c:\windows\'... would you honestly want to feed LockedList 'c:\windows\*.*' and have it throw up pretty much every locked file.. even though you might only want to overwrite two of them? I think your best bet is to create a list of the files you want to overwrite - either by A. hardcoding this in the installer by hand or by a pre-installer build-installer or B. extracting your files to a temporary location and use any of the FindFirst / FindNext / bits and pieces - and feed that to LockedList The 'B' method could be combined with lockedlist directly. i.e. code: The temporary location can be re-used with e.g. CopyFiles to get the files to the destination path without having to re-extract them from the installer. |
||
|
|
|
|
|
#137 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
You're better of generating the LockedList AddFile/AddModule code at compile time using Locate in a specially built NSIS executable that you execute with !system (see http://nsis.sourceforge.net/Invoking...n_compile-time). However, I think AddFolder would be fine when used properly (i.e. your application's path that you may wish to completely remove).
Stu |
|
|
|
|
|
#138 |
|
Member
Join Date: Mar 2008
Posts: 73
|
@Animather
I understand the complexity involved if AddFolder ( proposed function by Stu) is not used properly. As rightly said , using it on C:\Windows or any system related folders can be an issue. If we know what folders or files that are going to be targeted , this is not an cause of worry . @Stu This function if developed can ease my application's perfomance, because the application can cause any of the files in the instalation directory to be locked. Hence looping over and using AddFile is an existing option, but an overhead. |
|
|
|
|
|
#139 |
|
Major Dude
Join Date: Jun 2001
Posts: 1,173
|
'AddFolder' true, fair enough for self-contained areas
|
|
|
|
|
|
#140 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Uploaded v1.6.
v1.6 - 4th June 2010 * Fixed processes getting repeated in the list. * Fixed list not auto scrolling to absolute bottom. * Next button text restored when using /ignore and no processes are found. * Added AddFolder plug-in function. * File description displayed for processes without a window caption. * Process Id displayed for processes without a window caption or file description. Stu |
|
|
|
|
|
#141 |
|
Moderator
|
Thanks Stu,
Indeed, processes were repeated in the list. Nice, that this is fixed now. I will test new build as soon as possible. -Pawel [Edit] Stu, Please add version information to dll, in next build (for Embeddedlists.dll too) PLEASE DONATE Projects: My Website | NSIS PL | Winamp PL | Winamp Help (PL) | Ultimate File Manager Winamp translations: Oficjalny Polski Pakiet Językowy (Official Polish Language Pack) Other Winamp projects: Winamp Color Themes | Winamp Icon Packs Winamp Tools: Winamp Tools (All About Winamp | Winamp Backup & Restore | Winamp Translation) |
|
|
|
|
|
#142 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
v1.7 - 8th July 2010
* Process file description now retreived by SystemEnum if no process caption found. * Added EnumProcesses plug-in function. * SilentSearch now uses a callback function instead of the stack. * SilentSearch /thread changed to /async. * Previously added processes now stored in an array for look up to prevent repetitions rather than looked up in the list view control. * Added FindProcess plug-in function. * Now gets 64-bit processes (but not modules). * RC2: Added version information resource. Stu |
|
|
|
|
|
#143 |
|
Moderator
|
Stu,
New version 1.7 doeasn't close finded applications (searching is OK, but when I clik Next button, I got message, "Cant close applications...".) v1.6 did it correctly. -Pawel PLEASE DONATE Projects: My Website | NSIS PL | Winamp PL | Winamp Help (PL) | Ultimate File Manager Winamp translations: Oficjalny Polski Pakiet Językowy (Official Polish Language Pack) Other Winamp projects: Winamp Color Themes | Winamp Icon Packs Winamp Tools: Winamp Tools (All About Winamp | Winamp Backup & Restore | Winamp Translation) |
|
|
|
|
|
#144 |
|
Senior Member
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
|
It is really a good plugin. But I found that the icons in the listview is not the small one of a executable file but a zoomed one of the big icon (32x32). The zoomed icon doesn't look as good as the original small icon of the executable file. So I modified the source code, using ExtractIconEx function replace with ExtractIcon.
Before: After: Attachment is the modified source LockedList.cpp. |
|
|
|
|
|
#145 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Nice one. I will update the plug-in.
Stu |
|
|
|
|
|
#146 |
|
Senior Member
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
|
Sorry for my poor English, I should say "using ExtractIconEx function to replace ExtractIcon".
Besides, line 1660 was incorrect, I typed a blank in the word "image" by accident when modifying: hIma geList = ImageList_Create ... Expecting your next version. |
|
|
|
|
|
#147 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
I have uploaded v1.9. I had a look at your code - there is no need for a global variable.
Stu |
|
|
|
|
|
#148 |
|
Senior Member
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
|
Yes, I am so folly, the variable is exactly unnecessary.
I have downloaded the new version, it is very good! |
|
|
|
|
|
#149 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
I have found some unicode build issues while building GetVersion which will likely apply to LockedList (partly due to migrating to VS2010). Will fix and reupload soon.
Stu |
|
|
|
|
|
#150 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Done. Unicode build was indeed faulty.
Stu |
|
|
|
|
|
#151 |
|
Junior Member
Join Date: Aug 2010
Location: Omsk, Russia
Posts: 1
|
IsFileLocked issue
Hi Stu
Thanks for the plugin, it is very good and helpful. Anyway, while testing it in my installer I've found one bug. It treat file as blocked in the case when this file has non-existent directories within the full path. This can be easily fixed by replacing this piece of code at line 2050 in LockedList.cpp code: with code: Also it would be great to replace code: to code: in LockedList.rc to be able to compile with MSVC Express edition. Dmitry |
|
|
|
|
|
#152 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Thanks I'll put in those mods
![]() Stu |
|
|
|
|
|
#153 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
v2.0 uploaded.
Stu |
|
|
|
|
|
#154 |
|
Junior Member
Join Date: Jul 2010
Posts: 9
|
LockedList plugin doesn't seem to work with x64?
I added this line in the installer script: LockedList::AddModule "$INSTDIR\some.dll" When compiled with w32, the dll is detected and the running program is shown. But when compiled on x64 and running it on the x64-Version of the program that is locking the dll, the file is not shown in the locked list. Is this a known issue? |
|
|
|
|
|
#155 | |
|
Major Dude
Join Date: Jun 2001
Posts: 1,173
|
Quote:
One thing you can try is testing if the file is locked, rather than the module. For this you might have to use a manual testing method, like trying to open the file for appending. If that fails - the file is locked. There's a few downsides to that method (you touch the file, and you won't know -what- is locking the file), but it's possibly all you've got
|
|
|
|
|
|
|
#156 |
|
Junior Member
Join Date: Sep 2007
Posts: 13
|
Add Custom not working?
Hi, I am making an enhancement to our installer to change the horrible "MCI-Command Handling Window" holding open an activex control to be a more sensible message but I can't get the AddCustom work.
I have tried using the example LockedListCustom.nsi and this builds but when I say 'Yes' to the question is myapp running it never show sin the lockedlist window. I get the same behaviour in my own installer. Details: lockedlist V2.0 OS: XP SP3 NSIS: 2.46 code: I have this running twice in the code above, once detecting if the file is in use (and currently forcing a true return) and once is extracted straight from the demo app. Any help with how to get this working appreciated. Thanks Mark Jones Last edited by mj_blue; 6th October 2010 at 13:57. Reason: no smiley |
|
|
|
|
|
#157 |
|
Major Dude
Join Date: Jun 2001
Posts: 1,173
|
uh oh... looks like a bug - an older version of LockedList (which we use, haven't done the round of plugin updates yet) does work correctly with the example.
|
|
|
|
|
|
#158 |
|
Junior Member
Join Date: Sep 2007
Posts: 13
|
Hi Animaether,
what version of the plugin are you using? I'll downgrade on my test setup and check that this code does actually work in principle. Thanks Mark |
|
|
|
|
|
#159 |
|
Major Dude
Join Date: Jun 2001
Posts: 1,173
|
My version is not versioned, so I can't say... but the date on the file inside the archive is 2010/Apr/28 - which would make it version 1.5 . Actually, I should have 1.6 in the actual current build as that fixes the Next button text. There's quite a few changes since 1.5/1.6, so I'd wait and see if Afrow knows what the problem might be (I didn't spot anything standing out in the source code, but I'm not a C/C++ programmer) so it can be fixed
|
|
|
|
|
|
#160 |
|
Junior Member
Join Date: Sep 2007
Posts: 13
|
Yes, it looks like this bug was introduced in V1.7, this works in V1.6 but when I upgrade to V1.7 then myapp never gets shown using the custom example.
A lot changed between the versions so I can't even see anything obvious to try and help sorry I could only see that it changed from using uiFunctionAddress to iFunctionAddress Mark |
|
|
|
![]() |
|
|||||||
| Tags |
| handle, plug-in |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|