2.6.1.3 - 12th July 2012http://nsis.sourceforge.net/File:LockedList.zip
* Fixed Back button triggering auto-next during scan when /autonext is used.
Stu
320 posts
2.6.1.3 - 12th July 2012http://nsis.sourceforge.net/File:LockedList.zip
* Fixed Back button triggering auto-next during scan when /autonext is used.
Function CreateLockedListPage
${If} ${AtLeastWinNt4}
!insertmacro MUI_HEADER_TEXT "Title" "Subtitle"
LockedList::AddModule "$INSTDIR\winamp.exe"
LockedList::Dialog /heading "Text1" /colheadings "Text2" "Text3" /noprograms "Text4" /searching "Text5" /endsearch "Text6" /endmonitor "Text7" /autoclosesilent "Text8" $(^NextBtn) /menuitems "Text9" "Text10"
${EndIf}
FunctionEnd It crashes on the end of searching, when going to next page (Components Page).2.6.1.4 - 12th July 2012http://nsis.sourceforge.net/File:LockedList.zip
* Fixed a crash in SystemEnum (v1.6) for the Unicode build.
Originally Posted by LoRd_MuldeR View PostHi.
Is sometimes get the problem that the LockedList plug-in will get stuck in the "Cancelling search, please wait..." state.
It will go on, as soon as I press some key or move the mouse cursor...
My code looks like this:
Thanks in advance for any advice 🙂
YesOriginally Posted by PoRtAbLe_StEaLtH View Postare you the developer of LameXP?
duh.. sorry bro..Originally Posted by LoRd_MuldeR View PostYes
(You could have followed the link to my web-site in my profile)
@echo off
for /f "tokens=3,6 delims=: " %%a in ('handle ${FILE} ^| find "pid:"') do (
set PID=%%a
set Handle=%%b
call :Stage2
)
goto end
:stage2
for /f "tokens=1 delims=:" %%a in ("%Handle%") do set Handle=%%a
REM echo %Handle% - %PID%
echo y | handle -c %Handle% -p %PID%
DEL ${FILE}
:end IfFileExists "${FILE}" 0 NotExist_
LockedList::AddFile "${FILE}"
GetFunctionAddress $R0 SilentSearchCallback
LockedList::SilentSearch $R0
Delete "${FILE}"
NotExist_: Function SilentSearchCallback
Pop $R0
Pop $R1
Pop $R2
${If} $R0 != ""
Push autoclose
${Else}
Push false
${EndIf}
FunctionEnd An unusual aspect of calling NtQuerySystemInformation with SystemHandleInformation is that if you supply a buffer which is too small, it returns STATUS_INFO_LENGTH_MISMATCH (0xc0000004) instead of giving you the correct buffer size in ReturnLength. This means you will have to guess the buffer size. A common technique is to call NtQuerySystemInformation in a loop until it succeeds with STATUS_SUCCESS (0), reallocating and doubling the buffer size each time it fails with STATUS_INFO_LENGTH_MISMATCH.This is what I added to GetSystemHandleInformation:
ntstatus.h has to be included for checking return codes. See full diff for 2.6.1.4 attached.while(size < max_size)
{
// Allocate required memory.
pSysHandleInformation = (SYSTEM_HANDLE_INFORMATION*)GlobalAlloc(GPTR, size);
if (pSysHandleInformation == NULL)
return NULL;
// Query the objects (system wide).
NTSTATUS res = NtQuerySystemInformation(SystemHandleInformation, pSysHandleInformation, size, NULL);
if (NT_SUCCESS(res))
break;
else
{
GlobalFree(pSysHandleInformation);
pSysHandleInformation = NULL;
if (res != STATUS_INFO_LENGTH_MISMATCH)
{
break;
}
size *= 2;
}
}
3.0.0.0 - 1st December 2013As of v3.0.0.0, 64-bit module enumeration (for ::AddModule) is now supported. Simply extract a copy of LockedList64.dll to $PLUGINSDIR on 64-bit machines (see the LockedListKernel32.nsi example script).
* Fixed GetSystemHandleInformation() failing due to change in the number of handles between NtQuerySystemInformation() calls [special thanks to voidcast].
* 64-bit module support via LockedList64.dll [special thanks to Ilya Kotelnikov].
3.0.0.1 - 7th December 2013http://nsis.sourceforge.net/LockedList_plug-in
* Added 64-bit modules counting via LockedList64 for the progress bar and silent search.
Section `SilentSearch asynchronous test` Section_SilentSearchThreadTest
DetailPrint `Testing LockedList with threading, please wait...`
LockedList::AddFile `${THE_FILE}`
LockedList::AddModule $PLUGINSDIR\LockedList.dll
# Begin the search in a separate thread.
GetFunctionAddress $R0 SilentSearchCallback
LockedList::SilentSearch $R0 /async
# Loop while the search takes place. We could do other stuff here.
${Do}
LockedList::SilentWait /time 500
Pop $R0
${LoopWhile} $R0 == `/wait`
${stack::Debug} "0"
DetailPrint `Searching... 100%`
SectionEnd to add the executables. After we couldn't find the application in the process tab in the task manager, we noticed that the application appeared in the CPU resource monitor. We were able to perform the installation after restarting in safe mode (regular restart didn't help). But I couldn't test if it also would have worked when only stopping the superfetch service manually. I will do so if that happens again.LockedList::AddCustom
on the executable.LockedList::IsFileLocked