Announcement

Collapse
No announcement yet.

LockedList plug-in

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • LockedList plug-in

    An NSIS plugin to display or get a list of programs that are locking a selection of files that have to be uninstalled or overwritten.

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

    Stu
    Attached Files

  • #2
    v0.2 - 11th July 2007
    * Better percent complete indication.

    Stu

    Comment


    • #3
      Hi Afrow UK,

      Even simple script

      LockedList::AddFile /NOUNLOAD $SYSDIR\kernel32.dll"
      LockedList:ialog

      doesn't work for me.

      I get messages "Going to compile test program and then run it"
      then "The file '$TEMP\nsz1325.tmp\Lock' is now locked. It will appear on the LockedList dialog page soon..." some dialog blinks and that's all.

      The same result I've got with example provided with plugin.

      Comment


      • #4
        Firstly, you're missing a quote and secondly that's a module not a file.

        How about this script:
        code:
        Name "LockedList Test"
        OutFile "LockedListTest.exe"

        !include MUI.nsh

        !insertmacro MUI_PAGE_WELCOME
        Page Custom LockedListShow

        !insertmacro MUI_LANGUAGE English

        Function LockedListShow
        LockedList::AddModule /NOUNLOAD "$SYSDIR\kernel32.dll"
        LockedList:ialog
        FunctionEnd

        Section
        SectionEnd

        You'll get some garbage for the first program captions. I might be able to fix this.

        Stu

        Comment


        • #5
          Thank you for sample but it also doen't work for me.
          It seems that the problem is exactly in LockedList:ialog

          I modified your sample adding three message boxes

          code:

          Name "LockedList Test"
          OutFile "LockedListTest.exe"

          !include MUI.nsh

          !insertmacro MUI_PAGE_WELCOME
          Page Custom LockedListShow

          !insertmacro MUI_LANGUAGE English

          Function LockedListShow
          MessageBox MB_OK "test1"
          LockedList::AddModule /NOUNLOAD "$SYSDIR\kernel32.dll"
          MessageBox MB_OK "test2"
          LockedList:ialog
          FunctionEnd

          Section
          MessageBox MB_OK "test3"
          SectionEnd

          and I can see only two of them.

          Comment


          • #6
            You're not going to see the 3rd one because the dialog stops execution of the installer until it is closed.
            What exactly happens? Does the dialog not display?

            Edit: Also, what OS are you on?

            Stu

            Comment


            • #7
              dialog doesn't appear. installer is closed after message box "test2" closed.

              OS: WinXP SP2

              Comment


              • #8
                That's interesting. I'm running Win XP SP2 also.

                What happens if you don't use any AddFile/AddModules.

                Stu

                Comment


                • #9
                  ok, sorry for delay with answer. I had to deal with something.
                  now I'm sure that the problem is in LockedList:ialog

                  I have two vesions of script
                  code:

                  Name "LockedList Test"
                  OutFile "LockedListTest.exe"

                  !include MUI.nsh

                  !insertmacro MUI_PAGE_WELCOME

                  !insertmacro MUI_PAGE_INSTFILES

                  Page Custom LockedListShow

                  !insertmacro MUI_LANGUAGE English

                  Function LockedListShow
                  MessageBox MB_OK "test1"
                  LockedList::AddModule /NOUNLOAD "$SYSDIR\kernel32.dll"
                  MessageBox MB_OK "test2"
                  LockedList:ialog
                  FunctionEnd


                  Section "Install"
                  MessageBox MB_OK "test3"
                  SectionEnd

                  and

                  code:

                  Name "LockedList Test"
                  OutFile "LockedListTest.exe"

                  !include MUI.nsh

                  !insertmacro MUI_PAGE_WELCOME

                  Page Custom LockedListShow

                  !insertmacro MUI_PAGE_INSTFILES


                  !insertmacro MUI_LANGUAGE English

                  Function LockedListShow
                  MessageBox MB_OK "test1"
                  LockedList::AddModule /NOUNLOAD "$SYSDIR\kernel32.dll"
                  MessageBox MB_OK "test2"
                  LockedList:ialog
                  FunctionEnd


                  Section "Install"
                  MessageBox MB_OK "test3"
                  SectionEnd

                  the first one shows message boxes
                  "test3"
                  "test1"
                  "test2"

                  the second one
                  "test1"
                  "test2"

                  diff:
                  !insertmacro MUI_PAGE_WELCOME
                  !insertmacro MUI_PAGE_INSTFILES
                  Page Custom LockedListShow

                  !insertmacro MUI_PAGE_WELCOME
                  Page Custom LockedListShow
                  !insertmacro MUI_PAGE_INSTFILES

                  we contact directly so I can help you debug plugin
                  Last edited by daisywheel; 12 July 2007, 14:18.

                  Comment


                  • #10
                    I'm aware that it is the plugin yes.

                    My MSN is afrowuk at tiscali dot co dot uk

                    Stu

                    Comment


                    • #11
                      Located the problem thanks to daisywheel
                      Please be patient while we make sure everything is ok then I shall upload the updated version.

                      Stu

                      Comment


                      • #12
                        Uploaded v0.2 RC2.


                        Stu

                        Comment


                        • #13
                          LockedList::AddModule /NOUNLOAD "$SYSDIR\module.dll"
                          LockedList::AddModule /NOUNLOAD "$SYSDIR\kernel32.dll"

                          in case file module.dll doesn't exist will result error in functionality - there will no dependencies found

                          in case we change order
                          LockedList::AddModule /NOUNLOAD "$SYSDIR\kernel32.dll"
                          LockedList::AddModule /NOUNLOAD "$SYSDIR\module.dll"

                          plugin will work in another manner. I don't think this is expected behaviour.

                          Comment


                          • #14
                            Found the problem. It was a bad array pointer. It wasn't the fact of the file not being there it was simply only taking the first file or module added with AddFile/AddModule.

                            I was also able to fix the captions problem. I noticed captions were being repeated over multiple processes aside from the garbage caption for the first few processes. Just needed a ZeroMemory in there.

                            Uploaded v0.2 RC3.


                            Thanks again

                            Stu

                            Comment


                            • #15
                              One more suggestion. I'm not compeltely happy with results.
                              For example, I have two browser application run: Internet Explorer and Moxilla Firefox both on page http://nsis.sourceforge.net/File:LockedList.zip

                              also I use following code in a script
                              code:

                              LockedList::AddModule /NOUNLOAD "$SYSDIR\kernel32.dll"
                              LockedList:ialog

                              and as results I've got
                              WINAMP.COM | Forums - LockedList plug-in - Moxilla Firefox (firefox.exe)
                              for Moxilla Firefox
                              and
                              AutoSuggest Drop-Down (iexplore.exe)
                              for IE

                              Comment

                              Working...
                              X
                              😀
                              🥰
                              🤢
                              😎
                              😡
                              👍
                              👎