Batch file to list start menu shortcuts + their targets

    Question by:
    On

    Topics:

    Hi Experts
    I've been trying to thin out and streamline a problem Win98 (1st edition) system using a remote connection by VNC.  It's hard going, because the problem PC is on a standard dialup modem connection.  I'm on broadband, but the screen refresh time lag makes it really difficult navigating the start menu, and frequently causes me to click the wrong shortcut and launch app's that freeze the system.

    There's a lot of redundant start menu folders and shortcuts, and I was hoping to try and get a listing of the shortcuts and the targets they point to by running a batch file rather than having to check out the property pages of each shortcut one at a time.

    I can get the target of a given shortcut into a text file using the command:
    type "file name.lnk" | find /i "c:\" > linknames.txt
    but I can't figure a way that would traverse through the start menu listing the *.LNK files and then acting on each one to give a list something like this:

    C:\Windows\Start Menu\Programs\Prog1 Folder\Shortcut1.lnk
    C:\Program Files\Program1\Target1.exe
    C:\Windows\Start Menu\Programs\Prog2 Folder\Shortcut2.lnk
    C:\Program Files\Program2\Target2.exe
    etc.

    I'm aware of the CHKLNKS.EXE program in the Win98 Resource Kit, but I would rather get a listing and verify at my end while offline that the start menu folders and shortcuts were no longer needed before then deleting them using a batch file created from the listing.

    Any ideas?  Maybe using the FOR command or something?
    A small freeware utility program that could create such a listing would be a good alternative.

    Thanks
    Bill
    Good Question?
    0

    Top Expert Contributor

    Essential articles and videos from the Experts

    More valuable questions with Expert answers

    201601-LO-Qu-076

    Extend your technology team with the Experts Exchange community.

    — trusted by —

    Who answers my questions?Our community has technology experts around the world.

    David Johnson, CD, MVP

    5

    Articles

    7,564

    Solutions

    Expert in:

    • MS Legacy OS
    • Windows 7
    • Windows Server 2008
    • .NET Programming
    • ASP.NET

    McKnife

    7

    Articles

    4,100

    Solutions

    Expert in:

    • Windows 7
    • Active Directory
    • MS Legacy OS
    • OS Security
    • Windows 10

    John Hurst

    19

    Articles

    11,376

    Solutions

    Expert in:

    • Windows 7
    • MS Legacy OS
    • Outlook
    • Windows OS
    • Hardware-Other

    rindi

    13,936

    Solutions

    Expert in:

    • Hardware-Other
    • Laptops/Notebooks
    • Linux
    • Linux Distributions
    • Storage Hardware

    LockDown32

    55

    Solutions

    NVIT

    663

    Solutions

    Expert in:

    • Windows 7
    • Windows Batch
    • Windows OS
    • Windows Server 2008
    • Active Directory

    Maclean

    145

    Solutions

    Ben Hart

    297

    Solutions

    Expert in:

    • Active Directory
    • Exchange
    • Outlook
    • Windows Server 2008

    Edward Pamias

    134

    Solutions

    RELATED TOPICS view all topics

    1. MS Legacy OS
      (56,405)
    2. Windows XP
      (118,138)
    3. Windows 7
      (43,476)
    4. MS Server OS
      (55,944)
    5. Windows Vista
      (22,217)
    6. Windows Server 2003
      (129,301)
    7. Exchange
      (197,402)
    8. Windows Server 2008
      (80,980)
    9. Windows Networking
      (49,414)
    10. Active Directory
      (72,005)