• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 15262
  • Last Modified:

Editor for LNK Files

I'm looking for an Editor to edit LNK Files in NT.
1 Solution
I am not familiar with a LNK file, but if it is simply a text file, you can change the file extension to txt, edit using word pad, word, notepad; save the file, change the name back to a LNK.  You may also be able to simply open the LNK file as a text file in WORD if you select the "all files" option in the open screen.
kuehnAuthor Commented:
LNK Files are no Text files. This are BIN-Files. Example: If you place an Icon on your Desktop, Notepad.exe, on your desktop, then there is an LNK File called notepad.lnk. And I would like to edit this contents of this file with an Editor. Not with the Properties button.
LNK files are not files in there own right they simple are shortcuts that link to files that are already there.
You can add startup parameters with these but they are not the actual program they are just a link to the file.
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Did you tried using Quick View Plus ?
kuehnAuthor Commented:
I don't know what is quick view plus. I have tried to open them with Norten Commander in Hex and bin mode. My problem is, that I would like to adminitrate a lot of NT Workstation and we have a program, that needs an user id in the command line. This Command line is in the *.lnk file.

You can write your own program using IShellLink interface. Something like:

void main(int argc, char *argv[])
    HRESULT hres;

    char szGotPath[MAX_PATH];
    char szDescription[MAX_PATH];
    WIN32_FIND_DATA wfd;
    *lpszPath = 0; // assume failure
    // Get a pointer to the IShellLink interface.
    IShellLink* psl;
    hres = CoCreateInstance(&CLSID_ShellLink, NULL,
            CLSCTX_INPROC_SERVER, &IID_IShellLink, &psl);
    if (SUCCEEDED(hres)) {
        // Get a pointer to the IPersistFile interface.
        IPersistFile* ppf;
        hres = psl->QueryInterface(&IID_IPersistFile,
        if (SUCCEEDED(hres)) {
            // Ensure that the string is Unicode.
            WCHAR wsz[MAX_PATH];
            MultiByteToWideChar(CP_ACP, 0, argv[1], -1, wsz,
            // Load the shortcut.
            hres = ppf->Load(wsz, STGM_READWRITE);
            if (SUCCEEDED(hres)) {

                        //this is where you modify the shotcut


            hres = ppf->Save(wsz, TRUE);

        // Release the pointer to the IPersistFile interface.
    // Release the pointer to the IShellLink interface.
    return hres;

DISCLAIMER: i've never run or even compiled this program, it's just a sceleton code from MS help that I changed a bit. But it gives you an idea.
kuehnAuthor Commented:
I have no compiler for NT.
There is an NT Resource Kit Utility called Shortcut.EXE and it can modify shortcut files.
The most useful thing for NT users it that it can make a Shortcut Non-Tracking, which can be useful.  I don't know if you can get SHORTCUT.EXE without getting the kit.. you might want to search the net. It is a big place out there ;)
kuehnAuthor Commented:
I have searched the net and I have searched the ResKit, but I have not found Shortcut.exe for NT as an lnk editor. There are a lot of programms called, shortcut.exe in the net. But nothing for this job.

kuehnAuthor Commented:

I have solved the Problem. The tool shortcut.exe only works under Win95. Not under NT. There is a tool, called scut.exe at http://www.coffeecomputing.com/free/index.html. This works under NT and 95.
You can use Windows scripting host to modify shortcuts or .lnk files.

You will need to create a small script which opens the file as an object and then you simply modify the properties of the object.

You can get all of this from www.microsoft.com/scripting.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now