Solved

Editor for LNK Files

Posted on 1998-07-09
11
14,748 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
Why won’t your email signature format correctly?

Struggling to get your corporate email signatures to format correctly? Does the logo keep resizing? Is the text appearing too big? What can you do to prevent this? Find out how you can save your signatures today.

 
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

Why spend so long doing email signature updates?

Do you spend loads of your time carrying out email signature updates? Not very interesting are they? Don’t let signature updates get you down. Let Exclaimer Cloud - Signatures for Office 365 make managing email signatures a breeze.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

911 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

18 Experts available now in Live!

Get 1:1 Help Now