Old 11th October 2010, 08:50   #161
MrSpock77
Junior Member
 
Join Date: Apr 2010
Posts: 5
SilentSearch doesn't work as expected in Windows 2000 (SP4). I tried to run LockedListTest.nsi. The callback function is called for every running process, which is not correct. I did also notice that the Path is empty.

HTML Code:
Testing LockedList without threading, please wait...
Id: 8
Path: 
Description: Process Id: 8
Id: 160
Path: 
Description: Process Id: 160
Id: 188
Path: 
Description: Process Id: 188
Id: 208
Path: 
Description: NetDDE Agent
Id: 236
Path: 
Description: Process Id: 236
Id: 248
Path: 
Description: Process Id: 248
Id: 436
Path: 
Description: Process Id: 436
Id: 464
Path: 
Description: Process Id: 464
Id: 500
Path: 
Description: Process Id: 500
Id: 532
Path: 
Description: Process Id: 532
Id: 580
Path: 
Description: Process Id: 580
Id: 624
Path: 
Description: SYSTEM AGENT COM WINDOW
Id: 692
Path: 
Description: Process Id: 692
Id: 712
Path: 
Description: Process Id: 712
Id: 732
Path: 
Description: Process Id: 732
Id: 744
Path: 
Description: Process Id: 744
Id: 768
Path: 
Description: Process Id: 768
Id: 1232
Path: 
Description: Process Id: 1232
Id: 1296
Path: 
Description: ModemDeviceChange
Id: 1380
Path: 
Description: Process Id: 1380
Id: 1072
Path: 
Description: Process Id: 1072
Id: 1156
Path: 
Description: Process Id: 1156
Id: 1392
Path: 
Description: Windows Task Manager
Id: 704
Path: 
Description: LockedListTest Setup 
Searching... 100%
Completed
A few of our customers still use Windows 2000, so I would appreciate if this can be fixed.
MrSpock77 is offline   Reply With Quote
Old 11th October 2010, 11:04   #162
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
I'm quite busy at the moment with University. When I get some free time I'll take a look at both issues. I don't have a Windows 2000 machine handy though; only Windows XP.

Stu
Afrow UK is offline   Reply With Quote
Old 11th October 2010, 19:48   #163
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
I can test on win2k if you want. You can also poke me in the IRC channel (nick Message).
MSG is offline   Reply With Quote
Old 12th October 2010, 08:26   #164
mj_blue
Junior Member
 
Join Date: Sep 2007
Posts: 13
Thanks Afrow.. I am looking into getting setup so I can build plugins and will try stepping through it if I ever get setup
mj_blue is offline   Reply With Quote
Old 12th October 2010, 08:35   #165
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
That would be helpful. You can use Visual Studio Express:
http://www.microsoft.com/express/Windows/
Will also need a Windows SDK suitable for Windows 2000.

Stu
Afrow UK is offline   Reply With Quote
Old 19th October 2010, 13:28   #166
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
Uploaded v2.2:
* Fixed AddCustom not adding items.
* No longer returns processes with no file path.
* Added /autonext to automatically go to the next page when no items are found.

Note: The Windows 2000 issue is not fixed (merely avoided). It is likely that this plug-in will not work on Windows 2000 (it may use API only available in XP and above).

Stu
Afrow UK is offline   Reply With Quote
Old 19th October 2010, 17:54   #167
mj_blue
Junior Member
 
Join Date: Sep 2007
Posts: 13
Custom callbacks now work a treat for me in V2.2, Thanks Afrow. I did look at if I could build this but the solution appeared to be a VS2010 solution and I am setup with VS2008 for work.

Thanks again

Mark
mj_blue is offline   Reply With Quote
Old 22nd December 2010, 15:07   #168
MrSpock77
Junior Member
 
Join Date: Apr 2010
Posts: 5
I would like to have another switch to LockedList::Dialog and LockedList::InitDialog which automatically closes the dialog if no running applications were found. I just want to move on to the next page, without having to click Next.
MrSpock77 is offline   Reply With Quote
Old 24th December 2010, 14:21   #169
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
Just noticed /autonext is missing from the readme (except under the changelog). Will fix the readme. /autonext is what you want.

Stu
Afrow UK is offline   Reply With Quote
Old 24th December 2010, 15:06   #170
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,593
Quote:
Originally Posted by Afrow UK View Post
Note: The Windows 2000 issue is not fixed (merely avoided). It is likely that this plug-in will not work on Windows 2000 (it may use API only available in XP and above).
I don't see any reason why you can't make this work on 2000 (And probably NT4), but you have some hardcoded constants that are wrong (I just looked at a small part of the source, there are probably more )

PHP Code:
  // Skip System Idle Process and System.
  
if (file.ProcessId == || file.ProcessId == 4)
    return 
TRUE
System process pid is 8 on 2k and 2 on NT4 IIRC

When getting SystemHandleInformation on <=2003 (no more service packs there) you can check the object type directly without the need for threads (Must skip pipe's IIRC)

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 24th December 2010, 15:42   #171
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
Quote:
Originally Posted by Afrow UK View Post
Just noticed /autonext is missing from the readme (except under the changelog). Will fix the readme. /autonext is what you want.

Stu
That's something I've been looking for too.

Small request: Would it be possible to proceed automatically, as soon as all conflicting programs have been closed?

Currently it only proceeds automatically if initially no conflicting program was running...

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote
Old 24th December 2010, 16:50   #172
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
Quote:
Originally Posted by LoRd_MuldeR View Post
Small request: Would it be possible to proceed automatically, as soon as all conflicting programs have been closed?
This is in for next version. Thanks Anders I will look into that. I used threads because sometimes the func calls never return. Do you mean this should not happen on <= 2003? MuldeR, is there some remoting software you can install on the 2000 VM so that I can access it? I'm not sure if LogMeIn is an option. The other option I guess is I buy and mount a drive to install 2000 on and then create a VirtualBox image from it.

Stu
Afrow UK is offline   Reply With Quote
Old 24th December 2010, 18:11   #173
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
Quote:
Originally Posted by Afrow UK View Post
This is in for next version. Thanks Anders I will look into that. I used threads because sometimes the func calls never return. Do you mean this should not happen on <= 2003? MuldeR, is there some remoting software you can install on the 2000 VM so that I can access it? I'm not sure if LogMeIn is an option. The other option I guess is I buy and mount a drive to install 2000 on and then create a VirtualBox image from it.

Stu
Is TeamViewer okay for you? (see your PM)

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote
Old 24th December 2010, 23:54   #174
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,593
Quote:
Originally Posted by Afrow UK View Post
Do you mean this should not happen on <= 2003?
Stu
No, I mean the object type constants are known, and only certain object types cause problems when getting their name, so you can filter away based on the type before getting the names of the types you are interested in...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 26th December 2010, 13:48   #175
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
Quote:
Originally Posted by LoRd_MuldeR View Post
Is TeamViewer okay for you? (see your PM)
Afrow UK, still interested in Win2k remote access? Got my PM?

I am ready...

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote
Old 26th December 2010, 21:19   #176
MrSpock77
Junior Member
 
Join Date: Apr 2010
Posts: 5
Quote:
Originally Posted by Afrow UK View Post
Just noticed /autonext is missing from the readme (except under the changelog). Will fix the readme. /autonext is what you want.

Stu
Thank you!
MrSpock77 is offline   Reply With Quote
Old 29th December 2010, 07:36   #177
mrphantuan
Banned
 
Join Date: Nov 2010
Posts: 7
Currently it grabs the first window caption for that process id by using EnumWindows. I'll look into it. Maybe I can check if the window is a child or not and if it is then skip it.

Stu







________________
Chúng tôi là một trong những công ty tu van du hoc hàng đầu Việt Nam .Chúng tôi là đại diện cho nhiều tập đoàn du hoc hàng đầu TG tại Vietnam .Hàng năm đều có các xuất hoc bong du hoc miễn phí đi vụ du hoc singapore.
mrphantuan is offline   Reply With Quote
Old 4th January 2011, 21:13   #178
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
Quote:
Originally Posted by Afrow UK View Post
This is in for next version. Thanks Anders I will look into that. I used threads because sometimes the func calls never return. Do you mean this should not happen on <= 2003? MuldeR, is there some remoting software you can install on the 2000 VM so that I can access it? I'm not sure if LogMeIn is an option. The other option I guess is I buy and mount a drive to install 2000 on and then create a VirtualBox image from it.

Stu
Sorry for bumping this thread, but are there any news on this?

(The offer still stands: If I can help by providing access to the Win2k machine, feel free to contact me at any time!)

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote
Old 7th February 2011, 11:53   #179
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
Hi just an update on this. Sorry LoRd_MuldeR I never got to take up your offer on the Windows 2000 VM you had set up. Fortunately I was able to get a copy and use it in VirtualBox. The issue you found is now fixed. I just need to fix up the other small issues that Anders pointed out. Should have a new version out later today.

Stu
Afrow UK is offline   Reply With Quote
Old 7th February 2011, 13:10   #180
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
Quote:
Originally Posted by Afrow UK View Post
Hi just an update on this. Sorry LoRd_MuldeR I never got to take up your offer on the Windows 2000 VM you had set up. Fortunately I was able to get a copy and use it in VirtualBox. The issue you found is now fixed. I just need to fix up the other small issues that Anders pointed out. Should have a new version out later today.

Stu
That's good news

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote
Old 7th February 2011, 17:54   #181
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
v2.3 uploaded.

Stu
Afrow UK is offline   Reply With Quote
Old 10th February 2011, 23:07   #182
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
Quote:
Originally Posted by Afrow UK View Post
v2.3 uploaded.

Stu
Thanks. Works for me under Win2k now

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote
Old 28th February 2011, 11:23   #183
angelblaze
Junior Member
 
Join Date: Feb 2011
Posts: 2
Auto Terminate Patch

Below is a tiny patch to add auto close/kill without user having to click next/install.

Add new parameter /autoterm to LockedList::Dialog

Only tested for the following invocation
LockedList::Dialog /autoterm /autonext /autoclosesilent "" ""

probably not best way to do it but it seems to work :-)

code:

Index: LockedList.cpp
===================================================================
--- LockedList.cpp (revision 2134)
+++ LockedList.cpp (working copy)
@@ -1598,6 +1598,11 @@
{
g_fAutoNext = TRUE;
}
+ // Automatically start to Auto close/kill
+ else if (lstrcmpi(pszParam, TEXT("/autoterm")) == 0)
+ {
+ g_fAutoClosing = TRUE;
+ }
// Add new ignore button.
else if (lstrcmpi(pszParam, TEXT("/ignorebtn")) == 0)
{

angelblaze is offline   Reply With Quote
Old 28th February 2011, 12:35   #184
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
That's a bit drastic but OK

I will add and test when I get some time.

Stu
Afrow UK is offline   Reply With Quote
Old 28th February 2011, 13:04   #185
angelblaze
Junior Member
 
Join Date: Feb 2011
Posts: 2
Thumbs up

Agreed that closing programs without user interaction isn't a generally good idea. Our reasons are:
a) the updater needs to be totally passive with no user interaction required
b) our user base has proven itself incapable of closing programs on their own
c) other nsis plugins that I tried didn't provide nice feedback so we heard some complains about the updater being unresponsive if it took a long time to close a program.

Thank you for the excellent plugin!
angelblaze is offline   Reply With Quote
Old 2nd July 2011, 14:21   #186
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
Small bug fix release v2.4.
Quote:
* Improved support for Windows x64 - now retrieves 64-bit processes but still cannot enumerate 64-bit modules (this is not possible from a 32-bit process).
* Fixed infinite loop which sometimes occurred on Cancel button click.
http://nsis.sourceforge.net/File:LockedList.zip

Stu
Afrow UK is offline   Reply With Quote
Old 7th July 2011, 16:16   #187
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
Hello.

I experience crash with v2.4 on Windows XP (32-Bit), but not on Windows 7 (x64):
http://img850.imageshack.us/img850/9316/clipboard49.png

The code used is:
http://pastie.org/2178330

BTW: I am using the Unicode version of your plugin-in, if that matters.

(Reverted back to v2.3 and problem is gone)

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote
Old 11th July 2011, 16:44   #188
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
Quote:
v2.5 - 11th July 2011
* Fixed crash on Windows XP 32-bit and below.
Stu
Afrow UK is offline   Reply With Quote
Old 11th July 2011, 16:51   #189
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
Quote:
Originally Posted by Afrow UK View Post
Quote:
v2.5 - 11th July 2011
* Fixed crash on Windows XP 32-bit and below.
Stu

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote
Old 1st August 2011, 11:58   #190
Amarynth
Junior Member
 
Join Date: Aug 2011
Posts: 2
Hi

I wanted to use this plugin to check if someone else in LAN is locking files. But it seems as if the plugin is not able to check this.

Am I doing something wrong or isn't it possible to check if a file in the network is locked my someone else?


Ama
Amarynth is offline   Reply With Quote
Old 1st August 2011, 12:29   #191
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
Quote:
Originally Posted by Amarynth View Post
Hi

I wanted to use this plugin to check if someone else in LAN is locking files. But it seems as if the plugin is not able to check this.

Am I doing something wrong or isn't it possible to check if a file in the network is locked my someone else?


Ama
i don't think this will work.

LockedList is process-based, i.e. it checks for "local" processes that hold a lock on critical files and thus prevent the installer form continuing. While it might be possible to detect whether a local file is locked by "remote" access (actually the file would then be locked by the "file sharing" service running on the local machine), it won't be possible to tell which process on the "remote" computer holds the lock. There normally is, for good reason, no way to enumerate/analyze the processes on a "remote" machine. You'd have to run some kind of "monitoring service" on the remote machine to make information about running processes available over the network. Needles to say that the communication with the monitoring service should be encrypted and password protected. WMI can probably do that though...

Without additional "monitoring" software running on the "remote" machine, the machine_id + user_id holding the lock on the file is probably all you can get. That's basically what "Shared Folders" -> "Session" shows in the "Computer Manager".

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI

Last edited by LoRd_MuldeR; 1st August 2011 at 13:42.
LoRd_MuldeR is offline   Reply With Quote
Old 20th September 2011, 09:51   #192
LSI_Riedel
Junior Member
 
Join Date: Sep 2010
Posts: 4
Hello,

http://pastebin.com/g8dtbrMz

We're using LockedList to search for a running Process (see above part) in the .onInit function.
On 2.4 and 2.5 the installer simply exit (crashs?) between WelcomeScreen and License Page. On 2.3 it works. The problem occurs only on WinXP 64.

We have just downgrade to 2.3 and hope we got no other problems.
Is there a way to fix it? Did you need some more information?


Thanks
Mike
LSI_Riedel is offline   Reply With Quote
Old 20th September 2011, 18:07   #193
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
To fix it one would need to rebuild the plug-in and hook it up to the debugger in Visual Studio on XP 64. Or perhaps you can compare the source code of the different versions to identify what the problem could be.

Stu
Afrow UK is offline   Reply With Quote
Old 9th January 2012, 12:16   #194
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
New version:
Quote:
v2.6 - 9th January 2012
* Added missing calls to EnableDebugPriv() in FindProcess and EnumProcesses.
Stu
Afrow UK is offline   Reply With Quote
Old 29th February 2012, 13:14   #195
rumovoice
Junior Member
 
Join Date: Nov 2011
Posts: 11
When LockedList is used with basic UI it correctly shows locked file list but when I click next it disables all buttons and clears user interface. So I end up with empty window and can't even close it. How to fix it? I don't want to switch to modern UI because I like minimalistic style and I'm writing an updater with only single page (setup progress).

Here's repro code:
code:
RequestExecutionLevel user
SetCompress off
XPStyle on
OutFile "test.exe"
InstallDir "$EXEDIR\inst"
Icon "${NSISDIR}\contrib\graphics\icons\orange-install.ico"

Section "Main Section" SecMain
SetOutPath "$INSTDIR"
LockedList::AddFolder $INSTDIR
LockedList:ialog
Pop $R0
;MessageBox MB_ICONINFORMATION|MB_OK "$R0"
File "foo.dll"
SectionEnd

rumovoice is offline   Reply With Quote
Old 29th February 2012, 17:49   #196
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
You're not using the plug-in correctly. Whether you use MUI or not you can't show a dialog from a Section.

Stu
Afrow UK is offline   Reply With Quote
Old 29th February 2012, 17:56   #197
rumovoice
Junior Member
 
Join Date: Nov 2011
Posts: 11
Can you please show me simple example how to use it correctly? (I'm new to NSIS and I only found examples for MUI)
rumovoice is offline   Reply With Quote
Old 1st March 2012, 10:31   #198
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
It is the same for MUI as it is for non MUI. You create a custom page using Page.

Stu
Afrow UK is offline   Reply With Quote
Old 2nd March 2012, 09:04   #199
SwiftHalf
Junior Member
 
Join Date: Mar 2012
Posts: 1
64 bit issue

I just wanted to report a bug on 64 bit machines.

The plug-in calls Wow64DisableWow64FsRedirection but doesn't switch filesystem redirection on afterwards. I found this problem because I was trying to install some dlls to System32, and they ended up in the wrong place!

I worked around the problem by adding the following to my nsi script after the lockedlist plugin had done its stuff:

StrCpy $1 0
System::Call kernel32::Wow64RevertWow64FsRedirection(i.r0) i.r1
SwiftHalf is offline   Reply With Quote
Old 16th March 2012, 07:27   #200
stopasking
Banned
 
Join Date: Jun 2008
Posts: 446
Hi,

the '/autonext' option is not working with the UNICODE plugin (on my Win7 x64 machine - if it is relevant).

When I use 'LockedList::Show' and do a Pop $0 there are different strings in the ANSI and UNICODE plugin when I press the back button. $0 == 'back' (ANSI) and $0 == 'b' (UNICODE). This makes it hard to write compatible NSIS code (or I am using it the wrong way ).
stopasking 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