Announcement

Collapse
No announcement yet.

Check my little project - hangs with "Not Responding"

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

  • Check my little project - hangs with "Not Responding"

    Hi guys.

    Been amusing myself with a little project. A Hash Checksum verifier.

    If I check a .svf file, which is small the app works a treat but if I input a large .iso file the app hangs with "Not Responding" for a wee while then gives the results I wish.

    I don't know what I am doing wrong. Was hoping somebody could look at it and give me a clue

    Cheers..

    Verihash.apz

  • #2
    It's been a few days, quite a few folk have looked at this post but sadly for me nobody has commented.

    Can I now ask,
    Did anybody download the file and look at the coding ?
    Did anybody try it ?

    I think it's possible quite a few of you would know what a hash checksum is and why it is good practice to verify such things.

    I thought it was coming together quite nicely.

    Come on guys, give us some feed back.

    Comment


    • #3
      Little update.
      Changed the inputs to paragraphs when displaying information.
      Updated to the way I want it to look.

      VeriHash.apz

      Comment


      • #4
        Well just decided to try summet.

        I have found the "certutil.exe" and added that to my project.

        very very very simple code for now but this

        Code:
        result = CommandLine.Execute("AutoPlay\\certutil\\certutil. exe -hashfile C:\\Users\\Malcs\\Desktop\\NoGaps\\[en-gb]_en-gb_windows_10_consumer_editions_version_20h2_updat ed_dec_2020_x64_dvd_df20236e.svf SHA256", 0);
        
        Input.SetText("Input1", result.StdOut);
        Gives me my hash value I want and at first glance it does not seem to hang....

        Will continue on and see where I get.

        Comment


        • #5
          Well that was a failure.

          Changed the version I uploaded earlier to point to the .ese within the project and it still hangs.

          **** ! Thought i was onto summet.

          Back to the drawing board.

          Comment


          • #6
            Gunna try and see if invoking as Admin will stop the Not Responding.

            First thing i noticed is that the "File Drop" coding does not work when invoking as Admin.

            So gunna start again with just File Browse with Invoke As Admin.

            We'll see what happens.

            Comment


            • #7
              Hi,

              maybe removing the space between certutil. exe will help?


              mario
              programming is very easy, just put the characters in the right order....

              Comment


              • #8
                Originally posted by ovm View Post
                Hi,

                maybe removing the space between certutil. exe will help?


                mario
                Never noticed that. Thanks for pointing that out.

                Comment


                • #9
                  Think I have found my problem.
                  Been testing various scripts but with no improvement. So I decided to look back through my old projects. I felt I had come across a similar script before.
                  Found something very interesting. Double back slash separators.

                  On a file path say
                  CertUtil -hashfile "C:\Users\Malcs\Desktop\Hash Info 2021\disc.iso" SHA1
                  it worked better like so
                  CertUtil -hashfile "C:\\Users\\Malcs\\Desktop\\Hash Info 2021\\disc.iso" SHA1
                  Running simple scripts of writing various strings to a text doc and having the text doc read back and a commandline.execute this string works pretty well.
                  It calculates the checksum quicker than before and does not hang. Well on initial testing anyway.

                  Better coding is needed to neaten and tie everything together but I fell confidant it will work.




                  Comment


                  • #10
                    Yep... Really think I have cracked it.

                    A button and an input using this code

                    Code:
                    ImageNamePath = Dialog.FileBrowse(true, "Locate File", _DesktopFolder, "All Files (*.iso,.svf)|*.iso;*.svf|", "", "dat", false, false);
                    
                    if (ImageNamePath[1] ~= "CANCEL") then -- Does nothing if "Cancel" was pressed
                    
                    DoubleBackSlash = String.Replace(ImageNamePath[1], "\\", "\\\\", false);
                    Input.SetText("DoubleBackSlash", DoubleBackSlash);
                    
                    CertUtil = "CertUtil -hashfile \""
                    Algo = "\" SHA1"
                    
                    DOSCommand = CertUtil .. DoubleBackSlash .. Algo
                    
                    Input.SetText("DOSCommand", DOSCommand);
                    
                    result = CommandLine.Execute(DOSCommand, 0);
                    
                    Input.SetText("DOSCommandOutput", result.StdOut);
                    
                    end
                    Browses for an image file and calculates the checksum. Quite fast and with no hangs

                    Comment


                    • #11
                      After much deliberating what might be causing the "Not Responding" and much changing of codes I decided to remove the "drag n drop" part.
                      After a lot of testing I don't seem to have the "Not Responding" problem.

                      No idea if this is really the problem or not, further testing will show.

                      Anybody up for giving this a test ?
                      Anybody up for looking it at and giving feedback ?

                      One thing I would like to add is a progress bar to the "Satus.Dialogue" message. Cant seem to work that out at all.
                      So with that in mind can anybody point me in the right direction or give an example ?

                      ( May just start a new thread on the progress bar. Feel not many folk will be reading this far into the thread. )

                      Cheers

                      VeriHash - NO File Drop.apz

                      Comment


                      • #12
                        Whilst working last night I had a thought. It would be pretty neat been able to "right click" on an image I wish to check the hash value and have my project run and open with the image's Path, Name and Extension appear, just the same as it would with "drag and drop" or "file browse".

                        So I made a very very simple project, two buttons and one input. I set it up to read the "clipboard" and then display this string in the input. Then the other way round, read the input and copy it to the clipboard.
                        Then set it "Page Show" to read the "clipboard" and display the string
                        Code:
                        CBText = Clipboard.GetText();
                        Input.SetText("Input1", CBText);
                        Build the project.

                        Then with a simple .bat file and a simple .reg file to add the .bat file to run from the "Context menu" I can now "right click" on a file, it copies the file info to the "clipboard" then runs my project and displays the files info and soon and the .exe opens. Set to "Always On Top" too.

                        Obviously the .exe, .bat are placed in a certain folder so the .reg, .bat and .exe all know where each other is.

                        Tested it and it works pretty well.

                        Quite pleased with myself to be honest.

                        This will give my VeriHash project a new twist.


                        Comment

                        Working...
                        X