Questions tagged [lnk]

Use this tag for questions about Windows .lnk files representing Shortcuts (or Shell Links). For questions about link errors after compilation (of for example C/C++ code) use the tag [linker-error]

Use this tag if your question is about working with the .lnk (Shell Links) files from a programming perspective.

This can include:

  • the creation of such .lnk files,
  • the required registry keys,
  • its installation by means of a setupprogram,
  • its binary format
  • the relation with IShellLink

Notice that in Unix variants those files are sometimes called .Desktop files.

Wikipedia reference

128 questions
0
votes
1 answer

c# is there a way to get more than one files name without their path and their extension in an array?

For short what i want to do is get the names of the files in a certain folder as an array kind of like the example at the bottom, however it gets the full path instead of just name of the file, also keeps the .lnk part which i don't want…
aGoodFellow
  • 41
  • 10
0
votes
1 answer

java retrieve lnk file parameters and target

I would like to extract some info from a .lnk file in Java, specifically the entire target (with command line parameters after the initial .exe) and the working directory as well. In the question Windows shortcut (.lnk) parser in Java? by user…
fen
  • 73
  • 6
0
votes
0 answers

How to Drag custom filetype from browser to desktop/folder without creating shortcut?

I am writing a webpage that hosts some files on it that can be saved out if the user wants to. These files are Unity3D files under the format ".unitypackage" how do I write the drag and drop functionality in HTML to allow these files to be dragged…
0
votes
0 answers

PSEXEC will not open .lnk files

I am having an issue with PSEXEC to open .lnk files. It opens up but then closes. Can anyone help? for /f "delims=" %%i in (C:\_\2_Launch_Program\computers.txt) do ( start "%%i" C:\_\PStools\psexec \\%%i -u [Username] -p [password] -i cmd.exe /c…
swstrau118
  • 181
  • 4
  • 7
  • 15
0
votes
0 answers

Create a lnk in PowerShell/batch

I want to create a shortcut in batch/PowerShell and found this command (the variable id is set beforehand): powershell "$s=(New-Object -COM WScript.Shell).CreateShortcut('%userprofile%\Desktop\Steamlink.lnk');$s.TargetPath='C:\Meins\Steam\Steam.exe…
xeruf
  • 2,602
  • 1
  • 25
  • 48
0
votes
1 answer

Expression Web: Shortcut doesn't point to an exe file, but I want to use it to edit

Problem: I have to support users who need to edit web pages. Some of these web pages exist only as textarea controls. Fortunately, there is a firefox plugin that allows the user to open the textarea in a default text editor. Unfortunately, this…
dreftymac
  • 31,404
  • 26
  • 119
  • 182
0
votes
1 answer

cl : Command line error D8022 : cannot open 'c:\users\admini~1\appdata\local\temp\tmpjbx8xe.lnk'

I'm upgrading Windows build machines to use Visual Studio 2015 Update 3 scons 2.5.0 msbuild 14.0.25420.1 from Visual Studio 2013 Update 4 scons 2.3.4 msbuild 12.0.31101 But I'm hitting a build error. During the 'initial' run the build fails due…
Shane Gannon
  • 6,770
  • 7
  • 41
  • 64
0
votes
1 answer

Creating Shortcut where folder name is having unicode characters

I have been using the below code to create shortcuts dynamically. But the targetPath throws Argument exception when the folder name has unicode characters like Thai,greek language. IWshRuntimeLibrary.WshShell shell = new WshShell(); IWshShortcut…
TheCoder
  • 181
  • 4
  • 12
0
votes
1 answer

Create shortcut to .jar using java-code

I wrote an updater for my Java application which downloads its newest jar-file online, replaces the shortcut to it before starting the new jar and finally deleting itself. I used the following code to create the shortcut: try { //Location of…
Hering
  • 43
  • 1
  • 1
  • 7
0
votes
1 answer

Cannot delete a link (Windows 7)

I have a file here on an NTFS which is not owned by me. It's a .LNK file and points to a file that does no longer exist. Right clicking on the file and opening the security tab doesn't work since the actual file doesn't exist any more. I tried with…
Krischu
  • 1,024
  • 2
  • 15
  • 35
0
votes
1 answer

MFC-making lnk with custom icon

I'm using visual studio and would like to make 'lnk maker' which makes icon that lead user to website. "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" http://google.com I want to add my own icon on .lnk. lnk maker would be exe file and it…
DK2
  • 651
  • 1
  • 7
  • 34
0
votes
2 answers

How to create a shortcut without admin privileges in C#?

I want to create a .lnk shortcut to a .exe file on desktop but I can't run my program as admin. Using Windows Script Host Object does not work for me, because I get the Task could not find “AxImp.exe” error. This problem could be solved by…
SimonH
  • 1,385
  • 15
  • 35
0
votes
1 answer

c++ LNK2001 & LNK1120 compile errors

I am debugging some C++ software, and want to modify an existing function slightly, so that it changes the value of a particular variable used elsewhere in the program. The function is currently defined as so: void DataStore::setEraseSelected(){ …
Noble-Surfer
  • 3,052
  • 11
  • 73
  • 118
0
votes
1 answer

create shortcuts in java with lib JShortcut

I want to create shortcuts inwindows with code, I use the library here: http://alumnus.caltech.edu/~jimmc/jshortcut/jshortcut/README.html also the corresponding codes: import net.jimmc.jshortcut.JShellLink; public class remove { public static void…
printemp
  • 869
  • 1
  • 10
  • 33
0
votes
0 answers

Unresolved external LNK 1120

http://pastebin.com/Q8Z2deVK Its a PE file. I am getting LNK 1120 and LNK 2019. I googled both errors and it seems that there are a whole bunch of reasons for that error. LNK 1120 occurs in the same cpp file that my code is pasted in. LNK 2019…
Moosey
  • 1
  • 1
1 2 3
8 9