Pause the GACUTIL.exe listing

105 Views Asked by At

On my Windows System, I have over 3000 registered libraries in my GAC. When I use gacutil /l the list is too large to fit in my command output window. I need to be able to browse through to see if my library is in the list, is there a way to pause the listing or to save it to a file.

3

There are 3 best solutions below

3
Damien_The_Unbeliever On BEST ANSWER

How people forget. You can pipe the output from any command to the more command. This then does paging of the output:

gacutil /l | more

Each time it's filled the screen, it will prompt with --more--. Press space to see the next page.

There are lots of options for working with more too (output from more /?):

Displays output one screen at a time.

MORE [/E [/C] [/P] [/S] [/Tn] [+n]] < [drive:][path]filename
command-name | MORE [/E [/C] [/P] [/S] [/Tn] [+n]]
MORE /E [/C] [/P] [/S] [/Tn] [+n] [files]

    [drive:][path]filename  Specifies a file to display one
                            screen at a time.

    command-name            Specifies a command whose output
                            will be displayed.

    /E      Enable extended features
    /C      Clear screen before displaying page
    /P      Expand FormFeed characters
    /S      Squeeze multiple blank lines into a single line
    /Tn     Expand tabs to n spaces (default 8)

            Switches can be present in the MORE environment
            variable.

    +n      Start displaying the first file at line n

    files   List of files to be displayed. Files in the list
            are separated by blanks.

    If extended features are enabled, the following commands
    are accepted at the -- More -- prompt:

    P n     Display next n lines
    S n     Skip next n lines
    F       Display next file
    Q       Quit
    =       Show line number
    ?       Show help line
    <space> Display next page
    <ret>   Display next line
1
Scott Chamberlain On

If you do gacutil /l > output.txt it will write the output of the command to the file named output.txt in whatever folder you are currently in.

0
kennyzx On

You can filter the list by specifying the assembly name.

For example,

GacUtil /l System.Data.Linq

Lists 2 assemblies named "System.Data.Linq" on my system, version 3.5 and version 4.0.