Menu

[Req] Switch to hide 7zG progression window

2006-08-01
2012-12-08
  • Camarade_Tux

    Camarade_Tux - 2006-08-01

    Hi,

    I have a project (not yet public) and I use 7zip to extract many many .7z files.

    The problem is for each file extracted, I get a window that appears and usually disappears within 2 seconds.
    7z's progress bar is usefull but with my small archives, it's 0% then 100%.

    I'd like to have a switch (-hide) to hide 7zG.exe, i.e. not to have it show its window.
    I'd done it myself if I could compile 7zG.

    Even better would be a "-hideXXX" switch where XXX is a threshold. If size is more than XXX, then progressbar is displayed (I have a *big* list of files and it would be far easier to use "Search and Replace" :P )

    I know -hideXXX will probably not be added, but -hide should be pretty easy. :)

    Thanks a lot. ^^

     
    • Igor Pavlov

      Igor Pavlov - 2006-08-02

      You can call command line version (7z.exe) with disabled window (win2000 and WinXP allow it).

       
    • Camarade_Tux

      Camarade_Tux - 2006-08-05

      How can I have this disabled window ?
      There is no compatibility problem since my project runs on XP (maybe on 2k) but not on Win9x but I never heard of that disabled window.

      PS: is there no way to "track" a discussion on SF's boards ?

       
      • Igor Pavlov

        Igor Pavlov - 2006-08-05

        - How can I have this disabled window ?

        No way now. Probably I'll add switch in future.

         
    • Nobody/Anonymous

      Thanks. :)

       
    • Camarade_Tux

      Camarade_Tux - 2006-09-01

      For 7za.exe or 7z.exe, I recently found an app called HStart.
      Let's quote from the official website ( http://www.ntwind.com/software/utilities.html ):
      "Starts console applications without any windows "
      And it is working at 100% !

      I had a problem with spaces in paths.
      I asked for help and the author told me I had to escape the quotes used for 7za.

      That's what I had:
      %WIHU%\hstart "7za.exe x "%WIHU%\Apps\Navigateurs\K-Meleon.7z" -o"%KMeleon%""

      And that's what it had to be:
      %WIHU%\hstart "7za.exe x \"%WIHU%\Apps\Navigateurs\K-Meleon.7z\" -o\"%KMeleon%\""

      (the space was in %KMeleon%)

      That's it. :)

       
    • Anonymous

      Anonymous - 2006-09-02

      you can use that code to start process with no window (only for console applications and only under windows 2000 and higher), thanks to MSDN:

      #include <windows.h>
      #include <stdio.h>
      #include <tchar.h>

      void _tmain( VOID )
      {
          STARTUPINFO si;
          PROCESS_INFORMATION pi;
          LPTSTR szCmdline=_tcsdup(TEXT("MyChildProcess"));

          ZeroMemory( &si, sizeof(si) );
          si.cb = sizeof(si);
          ZeroMemory( &pi, sizeof(pi) );

          // Start the child process.
          if( !CreateProcess( NULL,   // No module name (use command line)
              szCmdline,      // Command line
              NULL,           // Process handle not inheritable
              NULL,           // Thread handle not inheritable
              FALSE,          // Set handle inheritance to FALSE
              CREATE_NO_WINDOW,              // The process is a console application that is being run without a console window
              NULL,           // Use parent's environment block
              NULL,           // Use parent's starting directory
              &si,            // Pointer to STARTUPINFO structure
              &pi )           // Pointer to PROCESS_INFORMATION structure
          )
          {
              printf( "CreateProcess failed (%d).\n", GetLastError() );
              return;
          }

          // Wait until child process exits.
          WaitForSingleObject( pi.hProcess, INFINITE );

          // Close process and thread handles.
          CloseHandle( pi.hProcess );
          CloseHandle( pi.hThread );
      }

       
    • Nobody/Anonymous

      Is there anywhere a compilied Version available from  this?

       
    • Nobody/Anonymous

      Or can someone compile the Code ahead and release it?

      Thanks forward.

       

Log in to post a comment.

MongoDB Logo MongoDB