Andromo - Start Making Apps - Free Signup

Announcement

Collapse

New Forum Software

If you're here, you've found the new home for our forums. There will be some bugs to iron out, so thanks for your patience...
See more
See less

Cannot detect file in system32 folder

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

  • Cannot detect file in system32 folder

    search_results = File.Find("C:\\WINNT\\system32\\", "tsccvid.dll", true, true, nil);

    if search_results then
    Dialog.Message("Found File", "We found the codec.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
    else
    proceed = Dialog.Message("CODEC Not Available", "It appears that you do not have a CODEC needed to view the videos in this demo. Please click the OK button to install.", MB_OKCANCEL, MB_ICONINFORMATION, MB_DEFBUTTON1);
    end

    if proceed == IDOK then
    File.Run("AutoPlay\\Docs\\TSCC.exe", "", "", SW_SHOWNORMAL, false);
    end

    I don't know why this always returns true, whether the dll is there or not. Any ideas?

    Kurt

  • #2
    I did not try this code out, so please let me know if it will work (or if it gets you to a solution that works). Thank you.

    Code:
    search_results = File.Find("C:\\WINNT\\system32\\", "tsccvid.dll", true, true, nil); 
    
    if (search_results == false) then 
    	proceed = Dialog.Message("CODEC Not Available", "It appears that you do not have a CODEC needed to view the videos in this demo. Please click the OK button to install.", MB_OKCANCEL, MB_ICONINFORMATION, MB_DEFBUTTON1); 
    	     if (proceed == IDOK) then 
    		File.Run("AutoPlay\\Docs\\TSCC.exe", "", "", SW_SHOWNORMAL, true);
                              Dialog.Message("Install Complete!","The CODEC is now installed.  You are ready to watch the demo videos!");
    	     else
    	     end
    end
    Last edited by Intrigued; 03-09-2004, 07:40 PM.
    Intrigued

    Comment


    • #3
      To support multiple file systems you might want to change

      "C:\\WINNT\\system32\\"

      to

      _SystemFolder

      Tigg
      TJ-Tigger
      "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
      "Draco dormiens nunquam titillandus."
      Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

      Comment


      • #4
        It still does not work! It returns true, and will not attempt to install the codec. This is what I have:

        search_results = File.Find("_SystemFolder", "tsccvid.dll", true, true, nil);

        if (search_results == false) then
        proceed = Dialog.Message("CODEC Not Available", "It appears that you do not have a CODEC needed to view the videos in this demo. Please click the OK button to install.", MB_OKCANCEL, MB_ICONINFORMATION, MB_DEFBUTTON1);
        if (proceed == IDOK) then
        File.Run("AutoPlay\\Docs\\TSCC.exe", "", "", SW_SHOWNORMAL, true);
        Dialog.Message("Install Complete!","The CODEC is now installed. You are ready to watch the demo videos!");
        else
        end
        end

        Any more ideas? I have tried this about 20 different ways to no avail. I have verified that the file does NOT exist.

        Thanks!

        Comment


        • #5
          Another thing is that it might be that the DLL is in a sub folder too. Since you are recursing folders, if the DLL is in the System folder or any of the sub folders, it's going to return true.

          If you know for sure that the file is going to be in the System folder, do this instead:

          if not File.DoesExist(_SystemFolder .. "\\tsccvid.dll") then
          --your code to install the codec here
          end

          Comment


          • #6
            Bingo!

            Thanks Worm.

            Kurt

            Comment


            • #7
              Just a word of caution here though. If the Search was returning TRUE using the recurse folders. The DLL must be on the system already. So the question is, if it's on the system, is the codec already installed?
              Last edited by Worm; 03-09-2004, 08:52 PM.

              Comment


              • #8
                Worm...

                When does a .dll like this get put (if ever) into the dllcache folder on a Windows XP (Me in this example) folder?
                Intrigued

                Comment


                • #9
                  My understanding of the dllcache folder is that the OS keeps a copy of all "protected" dlls in that folder. No application is supposed to be able to update the dll in the system folder if it is also in the dllcache folder. Even if you copy a dll in manually, it will appear to copy, but the OS intercepts, and copies a the "protected" dll from the dllcache folder instead.

                  The only way these DLLs are supposedly able to be updated is through a Service Pack, or System Update. I've been told that as long as the newer DLL has the correct digitial signature, it will replace the current "protected" dll.

                  At least that's my understanding... I'm sure someone else will chime in if I've got it wrong.

                  Comment


                  • #10
                    Another situation to watch out for when installing Techsmith's codec...

                    On Windows NT, W2K and XP, administrator rights are required to install codecs.

                    source: http://fr.techsmith.com/products/studio/faqs.asp

                    Glad a solution was found. I own Camtasia Studio 2.0 myself and I am glad this was resolved in case I ever decide to use their codec in a project.
                    Intrigued

                    Comment


                    • #11
                      Thank you for that explanation. I had been wondering on that for a while and never took the time to 'google' my way to the answer.

                      *Worm... I just keep looking for I.R. to put a PayPal clickable-donate link by your name any day now! (grin)

                      This goes for TJ_Tigger as well!
                      Last edited by Intrigued; 03-09-2004, 09:11 PM.
                      Intrigued

                      Comment


                      • #12
                        Tig Rocks!

                        Comment

                        Working...
                        X