Solved

Editor for LNK Files

Posted on 1998-07-09
11
14,726 Views
Last Modified: 2013-12-28
I'm looking for an Editor to edit LNK Files in NT.
0
Comment
Question by:kuehn
11 Comments
 
LVL 1

Expert Comment

by:bwgerho
ID: 1784826
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.
0
 
LVL 1

Author Comment

by:kuehn
ID: 1784827
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.
0
 
LVL 3

Expert Comment

by:gpipes
ID: 1784828
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.
0
 
LVL 2

Expert Comment

by:moellert
ID: 1784829
Did you tried using Quick View Plus ?
0
 
LVL 1

Author Comment

by:kuehn
ID: 1784830
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.

0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 1

Expert Comment

by:Arkadiy
ID: 1784831
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,
            &ppf);
        if (SUCCEEDED(hres)) {
 
            // Ensure that the string is Unicode.
            WCHAR wsz[MAX_PATH];
            MultiByteToWideChar(CP_ACP, 0, argv[1], -1, wsz,
                MAX_PATH);
 
            // Load the shortcut.
            hres = ppf->Load(wsz, STGM_READWRITE);
            if (SUCCEEDED(hres)) {


                        //this is where you modify the shotcut

                        psl->SetArguments(argv[2])
                        
           
                  
                  
                  }

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

        // Release the pointer to the IPersistFile interface.
        ppf->lpVtbl->Release(ppf);
        }
    // Release the pointer to the IShellLink interface.
    psl->lpVtbl->Release(psl);
    }
    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.
0
 
LVL 1

Author Comment

by:kuehn
ID: 1784832
I have no compiler for NT.
0
 
LVL 1

Expert Comment

by:thomasda
ID: 1784833
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 ;)
0
 
LVL 1

Author Comment

by:kuehn
ID: 1784834
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.

0
 
LVL 1

Author Comment

by:kuehn
ID: 1784835
Hi

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.
0
 
LVL 1

Accepted Solution

by:
phillydee earned 20 total points
ID: 1784836
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.



0

Featured Post

Want to promote your upcoming event?

Are you going to an event? Are you going to be exhibiting at a tradeshow? Talking at a conference? Using a promotional banner in your email signature ensures that your organization’s most important contacts stay in the know and can potentially spread the word about the event.

Join & Write a Comment

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now